The API functions asynchronously (using CompletableFuture
)
and work is done on the threads supplied by the client's Executor
where practical.
HttpClient
also provides a simple synchronous mode, where all
work may be done on the calling thread.
CompletableFuture
s returned by this API will throw UnsupportedOperationException
for their obtrudeValue
and obtrudeException
methods. Invoking the cancel
method on a CompletableFuture
returned by this API will not interrupt
the underlying operation, but may be useful to complete, exceptionally,
dependent stages that have not already completed.
Unless otherwise stated, null
parameter values will cause methods
of all classes in this package to throw NullPointerException
.
Interface | Description |
---|---|
HttpHeaders |
A read-only view of a set of HTTP headers.
|
HttpRequest.BodyProcessor |
A processor which converts high level Java objects into flows of
ByteBuffer s suitable for sending as request bodies. |
HttpResponse.BodyHandler<T> |
A handler for response bodies.
|
HttpResponse.BodyProcessor<T> |
A processor for response bodies.
|
HttpResponse.MultiProcessor<U,T> |
A response processor for a HTTP/2 multi response.
|
WebSocket |
A WebSocket client conforming to RFC 6455.
|
WebSocket.Builder |
A builder for creating
WebSocket instances. |
WebSocket.Listener |
A listener for events and messages on a
WebSocket . |
Class | Description |
---|---|
HttpClient |
A container for configuration information common to multiple
HttpRequest s. |
HttpClient.Builder |
A builder of immutable
HttpClient s. |
HttpRequest |
Represents one HTTP request which can be sent to a server.
|
HttpRequest.Builder |
A builder of
HttpRequest s. |
HttpResponse<T> |
Represents a response to a
HttpRequest . |
MultiMapResult<V> |
A
Map containing the result of a HTTP/2 request and multi-response. |
Enum | Description |
---|---|
HttpClient.Redirect |
Defines automatic redirection policy.
|
HttpClient.Version |
The HTTP protocol version.
|
WebSocket.MessagePart |
A marker used by
WebSocket.Listener in cases where a partial
message may be received. |
Exception | Description |
---|---|
HttpTimeoutException |
Thrown when a response is not received within a specified time period.
|
WebSocketHandshakeException |
An exception used to signal the opening handshake failed.
|
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-9b151-2