HTTP Client and WebSocket APIs
-
Returns a BodyPublisher
that publishes a request
body consisting of the concatenation of the request bodies
published by a sequence of publishers.
Returns a request body publisher whose body is retrieved from the
given Flow.Publisher
.
Returns a request body publisher whose body is retrieved from the
given Flow.Publisher
.
HttpRequest.BodyPublishers.noBody()
A request body publisher which sends no request body.
Returns a request body publisher whose body is the given byte array.
HttpRequest.BodyPublishers.ofByteArray(byte[] buf,
int offset,
int length)
Returns a request body publisher whose body is the content of the
given byte array of length
bytes starting from the specified
offset
.
A request body publisher that takes data from an Iterable
of byte arrays.
A request body publisher that takes data from the contents of a File.
A request body publisher that reads its data from an
InputStream
.
Returns a request body publisher whose body is the given
String
, converted using the
UTF_8
character set.
Returns a request body publisher whose body is the given
String
, converted using the given character set.
Returns a BodyPublisher
that publishes a request
body consisting of the concatenation of the request bodies
published by a sequence of publishers.
Sets the request method and request body of this builder to the
given values.
Sets the request method of this builder to POST and sets its
request body publisher to the given value.
Sets the request method of this builder to PUT and sets its
request body publisher to the given value.