You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now :body is converted to java.net.http.HttpRequest$BodyPublisher which then be used to create the java.net.http.HttpRequest. The converter now does not support java.net.http.HttpRequest$BodyPublisher directly.
HttpClient use BodyPublisher's contentLength as the request header's content-length. And notice that directly setting content-length is restricted somehow. This is the scenario when I encountered the problem (when use stream as body, the request's content-length could not be set; the stream is a wrapped one which we know the exactly size).
The text was updated successfully, but these errors were encountered:
lotuc
added a commit
to lotuc/http-client
that referenced
this issue
Apr 23, 2024
Now
:body
is converted tojava.net.http.HttpRequest$BodyPublisher
which then be used to create thejava.net.http.HttpRequest
. The converter now does not supportjava.net.http.HttpRequest$BodyPublisher
directly.HttpClient use BodyPublisher's contentLength as the request header's
content-length
. And notice that directly settingcontent-length
is restricted somehow. This is the scenario when I encountered the problem (when usestream
as body, the request'scontent-length
could not be set; the stream is a wrapped one which we know the exactly size).The text was updated successfully, but these errors were encountered: