Uses of Interface
java.net.http.HttpRequest.BodyPublisher
Packages that use HttpRequest.BodyPublisher
-
Uses of HttpRequest.BodyPublisher in java.net.http
Methods in java.net.http that return HttpRequest.BodyPublisherModifier and TypeMethodDescriptionstatic HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.concat(HttpRequest.BodyPublisher... publishers)
Returns aBodyPublisher
that publishes a request body consisting of the concatenation of the request bodies published by a sequence of publishers.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.fromPublisher(Flow.Publisher<? extends ByteBuffer> publisher)
Returns a request body publisher whose body is retrieved from the givenFlow.Publisher
.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.fromPublisher(Flow.Publisher<? extends ByteBuffer> publisher, long contentLength)
Returns a request body publisher whose body is retrieved from the givenFlow.Publisher
.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.noBody()
A request body publisher which sends no request body.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.ofByteArray(byte[] buf)
Returns a request body publisher whose body is the given byte array.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.ofByteArray(byte[] buf, int offset, int length)
Returns a request body publisher whose body is the content of the given byte array oflength
bytes starting from the specifiedoffset
.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.ofByteArrays(Iterable<byte[]> iter)
A request body publisher that takes data from anIterable
of byte arrays.static HttpRequest.BodyPublisher
A request body publisher that takes data from the contents of a File.static HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.ofInputStream(Supplier<? extends InputStream> streamSupplier)
A request body publisher that reads its data from anInputStream
.static HttpRequest.BodyPublisher
Returns a request body publisher whose body is the givenString
, converted using theUTF_8
character set.static HttpRequest.BodyPublisher
Returns a request body publisher whose body is the givenString
, converted using the given character set.Methods in java.net.http that return types with arguments of type HttpRequest.BodyPublisherModifier and TypeMethodDescriptionabstract Optional<HttpRequest.BodyPublisher>
HttpRequest.bodyPublisher()
Returns anOptional
containing theHttpRequest.BodyPublisher
set on this request.Methods in java.net.http with parameters of type HttpRequest.BodyPublisherModifier and TypeMethodDescriptionstatic HttpRequest.BodyPublisher
HttpRequest.BodyPublishers.concat(HttpRequest.BodyPublisher... publishers)
Returns aBodyPublisher
that publishes a request body consisting of the concatenation of the request bodies published by a sequence of publishers.HttpRequest.Builder.method(String method, HttpRequest.BodyPublisher bodyPublisher)
Sets the request method and request body of this builder to the given values.HttpRequest.Builder.POST(HttpRequest.BodyPublisher bodyPublisher)
Sets the request method of this builder to POST and sets its request body publisher to the given value.HttpRequest.Builder.PUT(HttpRequest.BodyPublisher bodyPublisher)
Sets the request method of this builder to PUT and sets its request body publisher to the given value.