gnarroway / hato

An HTTP client for Clojure, wrapping JDK 11's HttpClient
MIT License
380 stars 27 forks source link

Multipart requests always result in `Transfer-encoding: chunked` #55

Open p-himik opened 1 year ago

p-himik commented 1 year ago

Hato converts the multipart parameters into a stream, which makes HttpClient to unconditionally use an InputStreamPublisher, which doesn't set content length, which results in a chunked request.

That can be problematic because e.g. Trello doesn't support it - its API returns HTTP 411 if a request doesn't have content length (and chunked requests can't have content length).