Java HTTP Client API (incubator module)
DRAFT 9-Ubuntu+0-9b149-1
A B C D E F G H I J K L M N O P R S T U V W 

A

ALWAYS - jdk.incubator.http.HttpClient.Redirect
Always redirect.
abort() - Method in interface jdk.incubator.http.WebSocket
Closes the WebSocket abruptly.
allValues(String) - Method in interface jdk.incubator.http.HttpHeaders
Returns an unmodifiable List of all of the values of the given named header.
apply(int, HttpHeaders) - Method in interface jdk.incubator.http.HttpResponse.BodyHandler
Return a BodyProcessor considering the given response status code and headers.
asByteArray() - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<byte[]> that returns a BodyProcessor<byte[]> obtained from BodyProcessor.asByteArray().
asByteArray() - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a BodyProcessor which stores the response body as a byte array.
asByteArrayConsumer(Consumer<Optional<byte[]>>) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<Void> that returns a BodyProcessor<Void> obtained from BodyProcessor.asByteArrayConsumer(Consumer).
asByteArrayConsumer(Consumer<Optional<byte[]>>) - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a BodyProcessor which provides the incoming body data to the provided Consumer of Optional<byte[]>.
asFile(Path) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<Path> that returns a BodyProcessor<Path> obtained from BodyProcessor.asFile(Path).
asFile(Path) - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a BodyProcessor which stores the response body in a file opened with the given name.
asFile(Path, OpenOption...) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<Path> that returns a BodyProcessor<Path> obtained from BodyProcessor.asFile(Path,OpenOption...).
asFile(Path, OpenOption...) - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a BodyProcessor which stores the response body in a file opened with the given options and name.
asFileDownload(Path, OpenOption...) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
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.
asMap(Function<HttpRequest, Optional<HttpResponse.BodyHandler<V>>>) - Static method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Returns a general purpose handler for multi responses.
asMap(Function<HttpRequest, Optional<HttpResponse.BodyHandler<V>>>, boolean) - Static method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Returns a general purpose handler for multi responses.
asString() - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<String> that returns a BodyProcessor<String> obtained from BodyProcessor.asString(Charset).
asString(Charset) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a BodyHandler<String> that returns a BodyProcessor<String> obtained from BodyProcessor.asString(Charset).
asString(Charset) - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a body processor which stores the response body as a String converted using the given Charset.
authenticator() - Method in class jdk.incubator.http.HttpClient
Returns an Optional containing the Authenticator set on this client.
authenticator(Authenticator) - Method in class jdk.incubator.http.HttpClient.Builder
Sets an authenticator to use for HTTP authentication.

B

Builder() - Constructor for class jdk.incubator.http.HttpClient.Builder
 
Builder() - Constructor for class jdk.incubator.http.HttpRequest.Builder
Creates a Builder.
body() - Method in class jdk.incubator.http.HttpResponse
Returns the body.
bodyProcessor() - Method in class jdk.incubator.http.HttpRequest
Returns an Optional containing the HttpRequest.BodyProcessor set on this request.
build() - Method in class jdk.incubator.http.HttpClient.Builder
Returns a HttpClient built from the current state of this builder.
build() - Method in class jdk.incubator.http.HttpRequest.Builder
Builds and returns a HttpRequest.
buildAsync() - Method in interface jdk.incubator.http.WebSocket.Builder
Builds a WebSocket.

C

CLOSED_ABNORMALLY - Static variable in interface jdk.incubator.http.WebSocket
The WebSocket Close message status code (1006), is designated for use in applications expecting a status code to indicate that the connection was closed abnormally, e.g., without sending or receiving a Close message.
clear() - Method in class jdk.incubator.http.MultiMapResult
 
completion(CompletableFuture<Void>, CompletableFuture<Void>) - Method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Returns a CompletableFuture<U> which completes when the aggregate result object itself is available.
connectTimeout(Duration) - Method in interface jdk.incubator.http.WebSocket.Builder
Sets a timeout for the opening handshake.
containsKey(Object) - Method in class jdk.incubator.http.MultiMapResult
 
containsValue(Object) - Method in class jdk.incubator.http.MultiMapResult
 
contentLength() - Method in interface jdk.incubator.http.HttpRequest.BodyProcessor
Returns the content length for this request body.
cookieManager() - Method in class jdk.incubator.http.HttpClient
Returns an Optional which contains this client's CookieManager.
cookieManager(CookieManager) - Method in class jdk.incubator.http.HttpClient.Builder
Sets a cookie manager.
copy() - Method in class jdk.incubator.http.HttpRequest.Builder
Returns an exact duplicate copy of this Builder based on current state.

D

DELETE(HttpRequest.BodyProcessor) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the request method of this builder to DELETE and sets its request body processor to the given value.
discard(U) - Static method in interface jdk.incubator.http.HttpResponse.BodyHandler
Returns a response body handler which discards the response body and uses the given value as a replacement for it.
discard(U) - Static method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a response processor which discards the response body.
duration() - Method in class jdk.incubator.http.HttpRequest
Returns the duration for this request.

E

entrySet() - Method in class jdk.incubator.http.MultiMapResult
 
executor() - Method in class jdk.incubator.http.HttpClient
Returns the Executor set on this client.
executor(Executor) - Method in class jdk.incubator.http.HttpClient.Builder
Sets the executor to be used for asynchronous tasks.
expectContinue() - Method in class jdk.incubator.http.HttpRequest
Returns this request's expect continue setting.
expectContinue(boolean) - Method in class jdk.incubator.http.HttpRequest.Builder
Request server to acknowledge request before sending request body.

F

FIRST - jdk.incubator.http.WebSocket.MessagePart
The first part of a message in a sequence.
finalRequest() - Method in class jdk.incubator.http.HttpResponse
Returns the final HttpRequest that was sent on the wire for the exchange ( may, or may not, be the same as the initial request ).
firstValue(String) - Method in interface jdk.incubator.http.HttpHeaders
Returns an Optional containing the first value of the given named (and possibly multi-valued) header.
firstValueAsLong(String) - Method in interface jdk.incubator.http.HttpHeaders
Returns an OptionalLong containing the first value of the named header field.
followRedirects() - Method in class jdk.incubator.http.HttpClient
Returns the follow-redirects setting for this client.
followRedirects(HttpClient.Redirect) - Method in class jdk.incubator.http.HttpClient.Builder
Specifies whether requests will automatically follow redirects issued by the server.
fromByteArray(byte[]) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
Returns a request body processor whose body is the given byte array.
fromByteArray(byte[], int, int) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
Returns a request body processor whose body is the content of the given byte array of length bytes starting from the specified offset.
fromByteArrays(Iterable<byte[]>) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
A request body processor that takes data from an Iterable of byte arrays.
fromFile(Path) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
A request body processor that takes data from the contents of a File.
fromInputStream(Supplier<? extends InputStream>) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
A request body processor that reads its data from an InputStream.
fromString(String) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
Returns a request body processor whose body is the given String, converted using the UTF_8 character set.
fromString(String, Charset) - Static method in interface jdk.incubator.http.HttpRequest.BodyProcessor
Returns a request body processor whose body is the given String, converted using the given character set.

G

get(Object) - Method in class jdk.incubator.http.MultiMapResult
 
GET() - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the request method of this builder to GET.
getBody() - Method in interface jdk.incubator.http.HttpResponse.BodyProcessor
Returns a CompletionStage which when completed will return the response body object.
getResponse() - Method in exception jdk.incubator.http.WebSocketHandshakeException
Returns the server's counterpart of the opening handshake.
getSubprotocol() - Method in interface jdk.incubator.http.WebSocket
Returns a subprotocol which has been chosen for this WebSocket.

H

HttpClient - Class in jdk.incubator.http
A container for configuration information common to multiple HttpRequests.
HttpClient.Builder - Class in jdk.incubator.http
A builder of immutable HttpClients.
HttpRequest - Class in jdk.incubator.http
Represents one HTTP request which can be sent to a server.
HttpRequest.Builder - Class in jdk.incubator.http
A builder of HttpRequests.
HttpResponse<T> - Class in jdk.incubator.http
Represents a response to a HttpRequest.
HttpTimeoutException - Exception in jdk.incubator.http
Thrown when a response is not received within a specified time period.
HttpClient.Redirect - Enum in jdk.incubator.http
Defines automatic redirection policy.
HttpClient.Version - Enum in jdk.incubator.http
The HTTP protocol version.
HTTP_1_1 - jdk.incubator.http.HttpClient.Version
HTTP version 1.1
HTTP_2 - jdk.incubator.http.HttpClient.Version
HTTP version 2
HttpHeaders - Interface in jdk.incubator.http
A read-only view of a set of HTTP headers.
HttpRequest.BodyProcessor - Interface in jdk.incubator.http
A processor which converts high level Java objects into flows of ByteBuffers suitable for sending as request bodies.
HttpResponse.BodyHandler<T> - Interface in jdk.incubator.http
A handler for response bodies.
HttpResponse.BodyProcessor<T> - Interface in jdk.incubator.http
A processor for response bodies.
HttpResponse.MultiProcessor<U,T> - Interface in jdk.incubator.http
A response processor for a HTTP/2 multi response.
HttpClient() - Constructor for class jdk.incubator.http.HttpClient
Creates an HttpClient.
HttpRequest() - Constructor for class jdk.incubator.http.HttpRequest
Creates an HttpRequest.
HttpResponse() - Constructor for class jdk.incubator.http.HttpResponse
Creates an HttpResponse.
HttpTimeoutException(String) - Constructor for exception jdk.incubator.http.HttpTimeoutException
 
header(String, String) - Method in class jdk.incubator.http.HttpRequest.Builder
Adds the given name value pair to the set of headers for this request.
header(String, String) - Method in interface jdk.incubator.http.WebSocket.Builder
Adds the given name-value pair to the list of additional headers for the opening handshake.
headers() - Method in class jdk.incubator.http.HttpRequest
The (user-accessible) request headers that this request was (or will be) sent with.
headers() - Method in class jdk.incubator.http.HttpResponse
Returns the received response headers.
headers(String...) - Method in class jdk.incubator.http.HttpRequest.Builder
Adds the given name value pairs to the set of headers for this request.

I

initCause(Throwable) - Method in exception jdk.incubator.http.WebSocketHandshakeException
 
isClosed() - Method in interface jdk.incubator.http.WebSocket
Tells whether the WebSocket is closed.
isEmpty() - Method in class jdk.incubator.http.MultiMapResult
 

J

jdk.incubator.httpclient - module jdk.incubator.httpclient
Defines the high-level HTTP and WebSocket API.
jdk.incubator.http - package jdk.incubator.http
High level HTTP and WebSocket API

K

keySet() - Method in class jdk.incubator.http.MultiMapResult
 

L

LAST - jdk.incubator.http.WebSocket.MessagePart
The last part of a message in a sequence.

M

MultiMapResult<V> - Class in jdk.incubator.http
A Map containing the result of a HTTP/2 request and multi-response.
map() - Method in interface jdk.incubator.http.HttpHeaders
Returns an unmodifiable multi Map view of this HttpHeaders.
method() - Method in class jdk.incubator.http.HttpRequest
Returns the request method for this request.
method(String, HttpRequest.BodyProcessor) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the request method and request body of this builder to the given values.

N

NEVER - jdk.incubator.http.HttpClient.Redirect
Never redirect.
NORMAL_CLOSURE - Static variable in interface jdk.incubator.http.WebSocket
The WebSocket Close message status code (1000), indicating normal closure, meaning that the purpose for which the connection was established has been fulfilled.
newBuilder() - Static method in class jdk.incubator.http.HttpClient
Creates a new HttpClient builder.
newBuilder() - Static method in class jdk.incubator.http.HttpRequest
Creates a HttpRequest builder.
newBuilder(URI) - Static method in class jdk.incubator.http.HttpRequest
Creates a HttpRequest builder.
newHttpClient() - Static method in class jdk.incubator.http.HttpClient
Returns a new HttpClient with default settings.
newWebSocketBuilder(URI, WebSocket.Listener) - Method in class jdk.incubator.http.HttpClient
Creates a builder of WebSocket instances connected to the given URI and receiving events and messages with the given Listener.
noBody() - Static method in class jdk.incubator.http.HttpRequest
A request body handler which sends no request body.

O

onBinary(WebSocket, ByteBuffer, WebSocket.MessagePart) - Method in interface jdk.incubator.http.WebSocket.Listener
Receives a Binary message.
onClose(WebSocket, int, String) - Method in interface jdk.incubator.http.WebSocket.Listener
Receives a Close message.
onError(HttpRequest, Throwable) - Method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Called if an error occurs receiving a response.
onError(WebSocket, Throwable) - Method in interface jdk.incubator.http.WebSocket.Listener
Notifies an I/O or protocol error has occurred.
onOpen(WebSocket) - Method in interface jdk.incubator.http.WebSocket.Listener
Notifies the Listener that it is connected to the provided WebSocket.
onPing(WebSocket, ByteBuffer) - Method in interface jdk.incubator.http.WebSocket.Listener
Receives a Ping message.
onPong(WebSocket, ByteBuffer) - Method in interface jdk.incubator.http.WebSocket.Listener
Receives a Pong message.
onRequest(HttpRequest) - Method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Called for the main request and each push promise that is received.
onResponse(HttpResponse<T>) - Method in interface jdk.incubator.http.HttpResponse.MultiProcessor
Called for each response received.
onText(WebSocket, CharSequence, WebSocket.MessagePart) - Method in interface jdk.incubator.http.WebSocket.Listener
Receives a Text message.

P

PART - jdk.incubator.http.WebSocket.MessagePart
A middle part of a message in a sequence.
POST(HttpRequest.BodyProcessor) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the request method of this builder to POST and sets its request body processor to the given value.
priority(int) - Method in class jdk.incubator.http.HttpClient.Builder
Sets the default priority for any HTTP/2 requests sent from this client.
proxy() - Method in class jdk.incubator.http.HttpClient
Returns an Optional containing the ProxySelector for this client.
proxy(ProxySelector) - Method in class jdk.incubator.http.HttpClient.Builder
Sets a ProxySelector for this client.
put(HttpRequest, CompletableFuture<HttpResponse<V>>) - Method in class jdk.incubator.http.MultiMapResult
 
PUT(HttpRequest.BodyProcessor) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the request method of this builder to PUT and sets its request body processor to the given value.
putAll(Map<? extends HttpRequest, ? extends CompletableFuture<HttpResponse<V>>>) - Method in class jdk.incubator.http.MultiMapResult
 

R

remove(Object) - Method in class jdk.incubator.http.MultiMapResult
 
request() - Method in class jdk.incubator.http.HttpResponse
Returns the initial HttpRequest that initiated the exchange.
request(long) - Method in interface jdk.incubator.http.WebSocket
Allows n more messages to be received by the Listener.

S

SAME_PROTOCOL - jdk.incubator.http.HttpClient.Redirect
Redirect to same protocol only.
SECURE - jdk.incubator.http.HttpClient.Redirect
Redirect always except from HTTPS URLs to HTTP URLs.
send(HttpRequest, HttpResponse.BodyHandler<T>) - Method in class jdk.incubator.http.HttpClient
Sends the given request using this client, blocking if necessary to get the response.
sendAsync(HttpRequest, HttpResponse.BodyHandler<T>) - Method in class jdk.incubator.http.HttpClient
Sends the given request asynchronously using this client and the given response handler.
sendAsync(HttpRequest, HttpResponse.MultiProcessor<U, T>) - Method in class jdk.incubator.http.HttpClient
Sends the given request asynchronously using this client and the given multi response handler.
sendBinary(ByteBuffer, boolean) - Method in interface jdk.incubator.http.WebSocket
Sends a Binary message with bytes from the given ByteBuffer.
sendClose() - Method in interface jdk.incubator.http.WebSocket
Sends an empty Close message.
sendClose(int, String) - Method in interface jdk.incubator.http.WebSocket
Sends a Close message with the given status code and the reason.
sendPing(ByteBuffer) - Method in interface jdk.incubator.http.WebSocket
Sends a Ping message with bytes from the given ByteBuffer.
sendPong(ByteBuffer) - Method in interface jdk.incubator.http.WebSocket
Sends a Pong message with bytes from the given ByteBuffer.
sendText(CharSequence) - Method in interface jdk.incubator.http.WebSocket
Sends a whole Text message with characters from the given CharSequence.
sendText(CharSequence, boolean) - Method in interface jdk.incubator.http.WebSocket
Sends a Text message with characters from the given CharSequence.
setHeader(String, String) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets the given name value pair to the set of headers for this request.
size() - Method in class jdk.incubator.http.MultiMapResult
 
sslContext() - Method in class jdk.incubator.http.HttpClient
Returns the SSLContext, if one was set on this client.
sslContext(SSLContext) - Method in class jdk.incubator.http.HttpClient.Builder
Sets an SSLContext.
sslParameters() - Method in class jdk.incubator.http.HttpClient
Returns an Optional containing the SSLParameters set on this client.
sslParameters() - Method in class jdk.incubator.http.HttpResponse
Returns the SSLParameters in effect for this response.
sslParameters(SSLParameters) - Method in class jdk.incubator.http.HttpClient.Builder
Sets an SSLParameters.
statusCode() - Method in class jdk.incubator.http.HttpResponse
Returns the status code for this response.
subprotocols(String, String...) - Method in interface jdk.incubator.http.WebSocket.Builder
Includes a request for the given subprotocols during the opening handshake.

T

timeout(Duration) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets a timeout for this request.
trailers() - Method in class jdk.incubator.http.HttpResponse
Returns the received response trailers, if there are any, when they become available.

U

uri() - Method in class jdk.incubator.http.HttpRequest
Returns this request's request URI.
uri() - Method in class jdk.incubator.http.HttpResponse
Returns the URI that the response was received from.
uri(URI) - Method in class jdk.incubator.http.HttpRequest.Builder
Sets this HttpRequest's request URI.

V

valueOf(String) - Static method in enum jdk.incubator.http.HttpClient.Redirect
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum jdk.incubator.http.HttpClient.Version
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum jdk.incubator.http.WebSocket.MessagePart
Returns the enum constant of this type with the specified name.
values() - Static method in enum jdk.incubator.http.HttpClient.Redirect
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum jdk.incubator.http.HttpClient.Version
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Method in class jdk.incubator.http.MultiMapResult
 
values() - Static method in enum jdk.incubator.http.WebSocket.MessagePart
Returns an array containing the constants of this enum type, in the order they are declared.
version() - Method in class jdk.incubator.http.HttpClient
Returns the HTTP protocol version requested for this client.
version() - Method in class jdk.incubator.http.HttpRequest
Returns the HTTP protocol version that will be requested for this HttpRequest.
version() - Method in class jdk.incubator.http.HttpResponse
Returns the HTTP protocol version that was used for this response.
version(HttpClient.Version) - Method in class jdk.incubator.http.HttpClient.Builder
Requests a specific HTTP protocol version where possible.
version(HttpClient.Version) - Method in class jdk.incubator.http.HttpRequest.Builder
Overrides the HttpClient.version() setting for this request.

W

WebSocketHandshakeException - Exception in jdk.incubator.http
An exception used to signal the opening handshake failed.
WebSocket.MessagePart - Enum in jdk.incubator.http
A marker used by WebSocket.Listener in cases where a partial message may be received.
WHOLE - jdk.incubator.http.WebSocket.MessagePart
A whole message consisting of a single part.
WebSocket - Interface in jdk.incubator.http
A WebSocket client conforming to RFC 6455.
WebSocket.Builder - Interface in jdk.incubator.http
A builder for creating WebSocket instances.
WebSocket.Listener - Interface in jdk.incubator.http
A listener for events and messages on a WebSocket.
WebSocketHandshakeException(HttpResponse<?>) - Constructor for exception jdk.incubator.http.WebSocketHandshakeException
 
A B C D E F G H I J K L M N O P R S T U V W 
Skip navigation links
Java HTTP Client API (incubator module)
DRAFT 9-Ubuntu+0-9b149-1

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, 2016, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.

DRAFT 9-Ubuntu+0-9b149-1