public interface HttpClient extends Measured
It allows you to make requests to HTTP servers, and a single client can make requests to any server.
It also allows you to open WebSockets to servers.
The client can also pool HTTP connections.
For pooling to occur, keep-alive must be true on the HttpClientOptions
(default is true).
In this case connections will be pooled and re-used if there are pending HTTP requests waiting to get a connection,
otherwise they will be closed.
This gives the benefits of keep alive when the client is loaded but means we don't keep connections hanging around unnecessarily when there would be no benefits anyway.
The client also supports pipe-lining of requests. Pipe-lining means another request is sent on the same connection before the response from the preceding one has returned. Pipe-lining is not appropriate for all requests.
To enable pipe-lining, it must be enabled on the HttpClientOptions
(default is false).
When pipe-lining is enabled the connection will be automatically closed when all in-flight responses have returned and there are no outstanding pending requests to write.
The client is designed to be reused between requests.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the client.
|
HttpClient |
connectionHandler(Handler<HttpConnection> handler)
Set a connection handler for the client.
|
HttpClientRequest |
delete(int port,
String host,
String requestURI)
Create an HTTP DELETE request to send to the server at the specified host and port.
|
HttpClientRequest |
delete(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
delete(RequestOptions options)
Create an HTTP DELETE request to send to the server with the specified options.
|
HttpClientRequest |
delete(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
delete(String requestURI)
Create an HTTP DELETE request to send to the server at the default host and port.
|
HttpClientRequest |
delete(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
delete(String host,
String requestURI)
Create an HTTP DELETE request to send to the server at the specified host and default port.
|
HttpClientRequest |
delete(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
deleteAbs(String absoluteURI)
Create an HTTP DELETE request to send to the server using an absolute URI
|
HttpClientRequest |
deleteAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
get(int port,
String host,
String requestURI)
Create an HTTP GET request to send to the server at the specified host and port.
|
HttpClientRequest |
get(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
get(RequestOptions options)
Create an HTTP GET request to send to the server with the specified options.
|
HttpClientRequest |
get(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
get(String requestURI)
Create an HTTP GET request to send to the server at the default host and port.
|
HttpClientRequest |
get(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
get(String host,
String requestURI)
Create an HTTP GET request to send to the server at the specified host and default port.
|
HttpClientRequest |
get(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
getAbs(String absoluteURI)
Create an HTTP GET request to send to the server using an absolute URI
|
HttpClientRequest |
getAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
getNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
getNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
getNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
getNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
head(int port,
String host,
String requestURI)
Create an HTTP HEAD request to send to the server at the specified host and port.
|
HttpClientRequest |
head(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
head(RequestOptions options)
Create an HTTP HEAD request to send to the server with the specified options.
|
HttpClientRequest |
head(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
head(String requestURI)
Create an HTTP HEAD request to send to the server at the default host and port.
|
HttpClientRequest |
head(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
head(String host,
String requestURI)
Create an HTTP HEAD request to send to the server at the specified host and default port.
|
HttpClientRequest |
head(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
headAbs(String absoluteURI)
Create an HTTP HEAD request to send to the server using an absolute URI
|
HttpClientRequest |
headAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
headNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
headNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
headNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
headNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
options(int port,
String host,
String requestURI)
Create an HTTP OPTIONS request to send to the server at the specified host and port.
|
HttpClientRequest |
options(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
options(RequestOptions options)
Create an HTTP OPTIONS request to send to the server with the specified options.
|
HttpClientRequest |
options(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
options(String requestURI)
Create an HTTP OPTIONS request to send to the server at the default host and port.
|
HttpClientRequest |
options(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
options(String host,
String requestURI)
Create an HTTP OPTIONS request to send to the server at the specified host and default port.
|
HttpClientRequest |
options(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
optionsAbs(String absoluteURI)
Create an HTTP OPTIONS request to send to the server using an absolute URI
|
HttpClientRequest |
optionsAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
optionsNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
optionsNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
optionsNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClient |
optionsNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
post(int port,
String host,
String requestURI)
Create an HTTP POST request to send to the server at the specified host and port.
|
HttpClientRequest |
post(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
post(RequestOptions options)
Create an HTTP POST request to send to the server with the specified options.
|
HttpClientRequest |
post(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
post(String requestURI)
Create an HTTP POST request to send to the server at the default host and port.
|
HttpClientRequest |
post(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
post(String host,
String requestURI)
Create an HTTP POST request to send to the server at the specified host and default port.
|
HttpClientRequest |
post(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
postAbs(String absoluteURI)
Create an HTTP POST request to send to the server using an absolute URI
|
HttpClientRequest |
postAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
put(int port,
String host,
String requestURI)
Create an HTTP PUT request to send to the server at the specified host and port.
|
HttpClientRequest |
put(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
put(RequestOptions options)
Create an HTTP PUT request to send to the server with the specified options.
|
HttpClientRequest |
put(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
put(String requestURI)
Create an HTTP PUT request to send to the server at the default host and port.
|
HttpClientRequest |
put(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
put(String host,
String requestURI)
Create an HTTP PUT request to send to the server at the specified host and default port.
|
HttpClientRequest |
put(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
putAbs(String absoluteURI)
Create an HTTP PUT request to send to the server using an absolute URI
|
HttpClientRequest |
putAbs(String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
java.util.function.Function<HttpClientResponse,Future<HttpClientRequest>> |
redirectHandler() |
HttpClient |
redirectHandler(java.util.function.Function<HttpClientResponse,Future<HttpClientRequest>> handler)
Set a redirect handler for the http client.
|
HttpClientRequest |
request(HttpMethod method,
int port,
String host,
String requestURI)
Create an HTTP request to send to the server at the specified host and port.
|
HttpClientRequest |
request(HttpMethod method,
int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
request(HttpMethod method,
RequestOptions options)
Create an HTTP request to send to the server with the specified options.
|
HttpClientRequest |
request(HttpMethod method,
RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method will break in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> |
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
int port,
String host,
String requestURI)
Like
request(HttpMethod, int, String, String) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Like
request(HttpMethod, int, String, String, Handler) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
RequestOptions options)
Like
request(HttpMethod, RequestOptions) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Like
request(HttpMethod, RequestOptions, Handler) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
request(HttpMethod method,
String requestURI)
Create an HTTP request to send to the server at the default host and port.
|
HttpClientRequest |
request(HttpMethod method,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
request(HttpMethod method,
String host,
String requestURI)
Create an HTTP request to send to the server at the specified host and default port.
|
HttpClientRequest |
request(HttpMethod method,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
HttpClientRequest |
requestAbs(HttpMethod method,
SocketAddress serverAddress,
String absoluteURI)
Like
requestAbs(HttpMethod, String) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
requestAbs(HttpMethod method,
SocketAddress serverAddress,
String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Like
requestAbs(HttpMethod, String, Handler) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
requestAbs(HttpMethod method,
String absoluteURI)
Create an HTTP request to send to the server using an absolute URI
|
HttpClientRequest |
requestAbs(HttpMethod method,
String absoluteURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
this method signature will change in Vert.x 4, the handler will use an
Handler<AsyncResult<HttpClientResponse>> ,
you can use instead the WebClient |
void |
webSocket(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the specified port, host and relative request URI
|
HttpClient |
websocket(int port,
String host,
String requestURI,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(int, String, String, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(int, String, String, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
void |
webSocket(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket at the relative request URI using the default host and port
|
HttpClient |
websocket(String requestURI,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(String, Handler) instead |
HttpClient |
websocket(String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(String, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
void |
webSocket(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the host and relative request URI and default port
|
HttpClient |
websocket(String host,
String requestURI,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(String, String, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(String, String, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
void |
webSocket(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified options.
|
void |
webSocketAbs(String url,
MultiMap headers,
WebsocketVersion version,
List<String> subProtocols,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified absolute url, with the specified headers, using
the specified version of WebSockets, and the specified WebSocket sub protocols.
|
HttpClient |
websocketAbs(String url,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI)
Deprecated.
use
webSocket(int, String, String, Handler) instead |
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(RequestOptions options)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers,
WebsocketVersion version)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String requestURI)
Deprecated.
use
webSocket(String, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI)
Deprecated.
use
webSocket(String, String, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
ReadStream<WebSocket> |
websocketStreamAbs(String url,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
use
webSocket(WebSocketConnectOptions, Handler) instead |
isMetricsEnabled
HttpClientRequest request(HttpMethod method, SocketAddress serverAddress, RequestOptions options)
request(HttpMethod, RequestOptions)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the options
parameter.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
HttpClientRequest request(HttpMethod method, RequestOptions options)
method
- the HTTP methodoptions
- the request optionsHttpClientRequest request(HttpMethod method, int port, String host, String requestURI)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest request(HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI)
request(HttpMethod, int, String, String)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the host
and port
parameters.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
HttpClientRequest request(HttpMethod method, String host, String requestURI)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest request(HttpMethod method, RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
method
- the HTTP methodoptions
- the request optionsHttpClientRequest request(HttpMethod method, SocketAddress serverAddress, RequestOptions options, Handler<HttpClientResponse> responseHandler)
request(HttpMethod, RequestOptions, Handler)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the options
parameter.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
@Deprecated HttpClientRequest request(HttpMethod method, int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientmethod
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest request(HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
request(HttpMethod, int, String, String, Handler)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the host
and port
parameters.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
@Deprecated HttpClientRequest request(HttpMethod method, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientmethod
- the HTTP methodhost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest request(HttpMethod method, String requestURI)
method
- the HTTP methodrequestURI
- the relative URI@Deprecated HttpClientRequest request(HttpMethod method, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientmethod
- the HTTP methodrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest requestAbs(HttpMethod method, String absoluteURI)
method
- the HTTP methodabsoluteURI
- the absolute URIHttpClientRequest requestAbs(HttpMethod method, SocketAddress serverAddress, String absoluteURI)
requestAbs(HttpMethod, String)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the absoluteURI
parameter.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
@Deprecated HttpClientRequest requestAbs(HttpMethod method, String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientmethod
- the HTTP methodabsoluteURI
- the absolute URIresponseHandler
- the response handlerHttpClientRequest requestAbs(HttpMethod method, SocketAddress serverAddress, String absoluteURI, Handler<HttpClientResponse> responseHandler)
requestAbs(HttpMethod, String, Handler)
using the serverAddress
parameter to connect to the
server instead of the absoluteURI
parameter.
The request host header will still be created from the absoluteURI
parameter.
Use SocketAddress.domainSocketAddress(String)
to connect to a unix domain socket server.
HttpClientRequest get(RequestOptions options)
options
- the request optionsHttpClientRequest get(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest get(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest get(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest get(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest get(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest get(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest get(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest getAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest getAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated HttpClient getNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClient getNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient getNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient getNow(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest post(RequestOptions options)
options
- the request optionsHttpClientRequest post(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest post(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest post(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest post(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest post(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest post(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest post(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest postAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest postAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handlerHttpClientRequest head(RequestOptions options)
options
- the request optionsHttpClientRequest head(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest head(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest head(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest head(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest head(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest head(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest head(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest headAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest headAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated HttpClient headNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClient headNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient headNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient headNow(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest options(RequestOptions options)
options
- the request optionsHttpClientRequest options(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest options(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest options(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest options(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest options(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest options(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest options(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest optionsAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest optionsAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated HttpClient optionsNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClient optionsNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient optionsNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClient optionsNow(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest put(RequestOptions options)
options
- the request optionsHttpClientRequest put(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest put(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest put(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest put(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest put(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest put(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest put(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest putAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest putAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handlerHttpClientRequest delete(RequestOptions options)
options
- the request optionsHttpClientRequest delete(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIHttpClientRequest delete(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated HttpClientRequest delete(RequestOptions options, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientoptions
- the request optionsresponseHandler
- the response handler@Deprecated HttpClientRequest delete(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated HttpClientRequest delete(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClienthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest delete(String requestURI)
requestURI
- the relative URI@Deprecated HttpClientRequest delete(String requestURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientrequestURI
- the relative URIresponseHandler
- the response handlerHttpClientRequest deleteAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated HttpClientRequest deleteAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
Handler<AsyncResult<HttpClientResponse>>
,
you can use instead the WebClientabsoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated HttpClient websocket(RequestOptions options, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(int port, String host, String requestURI, Handler<WebSocket> wsConnect)
webSocket(int, String, String, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(RequestOptions options, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(int port, String host, String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(int, String, String, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String host, String requestURI, Handler<WebSocket> wsConnect)
webSocket(String, String, Handler)
insteadhost
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String host, String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(String, String, Handler)
insteadhost
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocketAbs(String url, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadurl
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String requestURI, Handler<WebSocket> wsConnect)
webSocket(String, Handler)
insteadrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(String, Handler)
insteadrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocolswsConnect
- handler that will be called with the WebSocket when connected@Deprecated HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocolswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection failsvoid webSocket(int port, String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
port
- the porthost
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connectedvoid webSocket(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
host
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connectedvoid webSocket(String requestURI, Handler<AsyncResult<WebSocket>> handler)
requestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connectedvoid webSocket(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)
options
- the request optionsvoid webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols, Handler<AsyncResult<WebSocket>> handler)
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usehandler
- handler that will be called if WebSocket connection fails@Deprecated ReadStream<WebSocket> websocketStream(RequestOptions options)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request options@Deprecated ReadStream<WebSocket> websocketStream(int port, String host, String requestURI)
webSocket(int, String, String, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URI@Deprecated ReadStream<WebSocket> websocketStream(String host, String requestURI)
webSocket(String, String, Handler)
insteadhost
- the hostrequestURI
- the relative URI@Deprecated ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headers@Deprecated ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headers@Deprecated ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headers@Deprecated ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket version@Deprecated ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, WebsocketVersion version)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated ReadStream<WebSocket> websocketStreamAbs(String url, MultiMap headers, WebsocketVersion version, String subProtocols)
webSocket(WebSocketConnectOptions, Handler)
insteadurl
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols)
webSocket(WebSocketConnectOptions, Handler)
insteadoptions
- the request optionsheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
webSocket(WebSocketConnectOptions, Handler)
insteadport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
webSocket(WebSocketConnectOptions, Handler)
insteadhost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated ReadStream<WebSocket> websocketStream(String requestURI)
webSocket(String, Handler)
insteadrequestURI
- the relative URI@Deprecated ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headers@Deprecated ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, WebsocketVersion version)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
webSocket(WebSocketConnectOptions, Handler)
insteadrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocolsHttpClient connectionHandler(Handler<HttpConnection> handler)
HttpClient redirectHandler(java.util.function.Function<HttpClientResponse,Future<HttpClientRequest>> handler)
The redirect handler is called when a 3xx
response is received and the request is configured to
follow redirects with HttpClientRequest.setFollowRedirects(boolean)
.
The redirect handler is passed the HttpClientResponse
, it can return an HttpClientRequest
or null
.
Future<HttpClientRequest>
is returned, the client will send this new request
The handler must return a Future<HttpClientRequest>
unsent so the client can further configure it and send it.
handler
- the new redirect handlerjava.util.function.Function<HttpClientResponse,Future<HttpClientRequest>> redirectHandler()
void close()
Copyright © 2023 Eclipse. All rights reserved.