Modifier and Type | Method | Description |
---|---|---|
static HttpResponse.BodyHandler<byte[]> |
HttpResponse.BodyHandler.asByteArray() |
Returns a
BodyHandler<byte[]> that returns a
BodyProcessor <byte[] > obtained
from BodyProcessor.asByteArray() . |
static HttpResponse.BodyHandler<Void> |
HttpResponse.BodyHandler.asByteArrayConsumer(Consumer<Optional<byte[]>> consumer) |
Returns a
BodyHandler<Void> that returns a
BodyProcessor <Void> obtained from
BodyProcessor.asByteArrayConsumer(Consumer) . |
static HttpResponse.BodyHandler<Path> |
HttpResponse.BodyHandler.asFile(Path file) |
Returns a
BodyHandler<Path> that returns a
BodyProcessor <Path> obtained from
BodyProcessor.asFile(Path) . |
static HttpResponse.BodyHandler<Path> |
HttpResponse.BodyHandler.asFile(Path file,
OpenOption... openOptions) |
Returns a
BodyHandler<Path> that returns a
BodyProcessor <Path> obtained from
BodyProcessor.asFile(Path,OpenOption...) . |
static HttpResponse.BodyHandler<Path> |
HttpResponse.BodyHandler.asFileDownload(Path directory,
OpenOption... openOptions) |
Returns a
BodyHandler<Path> that returns a
BodyProcessor <Path >
where the download directory is specified, but the filename is
obtained from the Content-Disposition response header. |
static HttpResponse.BodyHandler<String> |
HttpResponse.BodyHandler.asString() |
Returns a
BodyHandler<String> that returns a
BodyProcessor <String> obtained from
BodyProcessor.asString(Charset) . |
static HttpResponse.BodyHandler<String> |
HttpResponse.BodyHandler.asString(Charset charset) |
Returns a
BodyHandler<String> that returns a
BodyProcessor <String> obtained from
BodyProcessor.asString(Charset) . |
static <U> HttpResponse.BodyHandler<U> |
HttpResponse.BodyHandler.discard(U value) |
Returns a response body handler which discards the response body and
uses the given value as a replacement for it.
|
Modifier and Type | Method | Description |
---|---|---|
Optional<HttpResponse.BodyHandler<T>> |
HttpResponse.MultiProcessor.onRequest(HttpRequest request) |
Called for the main request and each push promise that is received.
|
Modifier and Type | Method | Description |
---|---|---|
abstract <T> HttpResponse<T> |
HttpClient.send(HttpRequest req,
HttpResponse.BodyHandler<T> responseBodyHandler) |
Sends the given request using this client, blocking if necessary to get
the response.
|
abstract <T> CompletableFuture<HttpResponse<T>> |
HttpClient.sendAsync(HttpRequest req,
HttpResponse.BodyHandler<T> responseBodyHandler) |
Sends the given request asynchronously using this client and the given
response handler.
|
Modifier and Type | Method | Description |
---|---|---|
static <V> HttpResponse.MultiProcessor<MultiMapResult<V>,V> |
HttpResponse.MultiProcessor.asMap(Function<HttpRequest,Optional<HttpResponse.BodyHandler<V>>> pushHandler) |
Returns a general purpose handler for multi responses.
|
static <V> HttpResponse.MultiProcessor<MultiMapResult<V>,V> |
HttpResponse.MultiProcessor.asMap(Function<HttpRequest,Optional<HttpResponse.BodyHandler<V>>> pushHandler,
boolean completion) |
Returns a general purpose handler for multi responses.
|
Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b153-1