public class HttpClient extends Object implements 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.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<HttpClient> |
__TYPE_ARG |
Constructor and Description |
---|
HttpClient(HttpClient delegate) |
HttpClient(Object delegate) |
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.
|
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.
|
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.
|
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.
|
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.
|
boolean |
equals(Object o) |
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.
|
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.
|
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.
|
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.
|
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.
|
HttpClient |
getDelegate() |
HttpClient |
getNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
getNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
getNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
getNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
int |
hashCode() |
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.
|
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.
|
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.
|
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.
|
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.
|
HttpClient |
headNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
headNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
headNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
headNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
boolean |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
static HttpClient |
newInstance(HttpClient arg) |
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.
|
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.
|
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.
|
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.
|
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.
|
HttpClient |
optionsNow(int port,
String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
optionsNow(RequestOptions options,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
optionsNow(String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
HttpClient |
optionsNow(String host,
String requestURI,
Handler<HttpClientResponse> responseHandler)
Deprecated.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
int port,
String host,
String requestURI)
Like
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.RequestOptions) 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(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.RequestOptions) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpClientRequest |
request(HttpMethod method,
SocketAddress serverAddress,
RequestOptions options)
Like
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.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(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.RequestOptions) 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.
|
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.
|
HttpClientRequest |
requestAbs(HttpMethod method,
SocketAddress serverAddress,
String absoluteURI)
Like
requestAbs(io.vertx.core.http.HttpMethod, java.lang.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(io.vertx.core.http.HttpMethod, java.lang.String) 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.
|
Single<WebSocket> |
rxWebSocket(int port,
String host,
String requestURI)
Connect a WebSocket to the specified port, host and relative request URI
|
Single<WebSocket> |
rxWebSocket(String requestURI)
Connect a WebSocket at the relative request URI using the default host and port
|
Single<WebSocket> |
rxWebSocket(String host,
String requestURI)
Connect a WebSocket to the host and relative request URI and default port
|
Single<WebSocket> |
rxWebSocket(WebSocketConnectOptions options)
Connect a WebSocket with the specified options.
|
Single<WebSocket> |
rxWebSocketAbs(String url,
MultiMap headers,
WebsocketVersion version,
List<String> subProtocols)
Connect a WebSocket with the specified absolute url, with the specified headers, using
the specified version of WebSockets, and the specified WebSocket sub protocols.
|
String |
toString() |
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.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
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.
|
HttpClient |
websocket(String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
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.
|
HttpClient |
websocket(String host,
String requestURI,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect)
Deprecated.
|
HttpClient |
websocket(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols,
Handler<WebSocket> wsConnect,
Handler<Throwable> failureHandler)
Deprecated.
|
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.
|
Observable<WebSocket> |
webSocketAbsObservable(String url,
MultiMap headers,
WebsocketVersion version,
List<String> subProtocols)
|
Observable<WebSocket> |
webSocketObservable(int port,
String host,
String requestURI)
Deprecated.
|
Observable<WebSocket> |
webSocketObservable(String requestURI)
Deprecated.
|
Observable<WebSocket> |
webSocketObservable(String host,
String requestURI)
Deprecated.
|
Observable<WebSocket> |
webSocketObservable(WebSocketConnectOptions options)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(int port,
String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(RequestOptions options)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers,
WebsocketVersion version)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(RequestOptions options,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String requestURI)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version)
Deprecated.
|
ReadStream<WebSocket> |
websocketStream(String host,
String requestURI,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
|
ReadStream<WebSocket> |
websocketStreamAbs(String url,
MultiMap headers,
WebsocketVersion version,
String subProtocols)
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<HttpClient> __TYPE_ARG
public HttpClient(HttpClient delegate)
public HttpClient(Object delegate)
public HttpClient getDelegate()
getDelegate
in interface Measured
public boolean isMetricsEnabled()
isMetricsEnabled
in interface Measured
true
if metrics are enabledpublic HttpClientRequest request(HttpMethod method, SocketAddress serverAddress, RequestOptions options)
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.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 to connect to a unix domain socket server.
method
- serverAddress
- options
- public HttpClientRequest request(HttpMethod method, RequestOptions options)
method
- the HTTP methodoptions
- the request optionspublic HttpClientRequest request(HttpMethod method, int port, String host, String requestURI)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest request(HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI)
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.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 host
and port
parameters.
Use to connect to a unix domain socket server.
method
- serverAddress
- port
- host
- requestURI
- public HttpClientRequest request(HttpMethod method, String host, String requestURI)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest request(HttpMethod method, RequestOptions options, Handler<HttpClientResponse> responseHandler)
method
- the HTTP methodoptions
- the request optionsresponseHandler
- public HttpClientRequest request(HttpMethod method, SocketAddress serverAddress, RequestOptions options, Handler<HttpClientResponse> responseHandler)
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.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 to connect to a unix domain socket server.
method
- serverAddress
- options
- responseHandler
- @Deprecated public HttpClientRequest request(HttpMethod method, int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest request(HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
request(io.vertx.core.http.HttpMethod, io.vertx.rxjava.core.net.SocketAddress, io.vertx.core.http.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 host
and port
parameters.
Use to connect to a unix domain socket server.
method
- serverAddress
- port
- host
- requestURI
- responseHandler
- @Deprecated public HttpClientRequest request(HttpMethod method, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest request(HttpMethod method, String requestURI)
method
- the HTTP methodrequestURI
- the relative URI@Deprecated public HttpClientRequest request(HttpMethod method, String requestURI, Handler<HttpClientResponse> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest requestAbs(HttpMethod method, String absoluteURI)
method
- the HTTP methodabsoluteURI
- the absolute URIpublic HttpClientRequest requestAbs(HttpMethod method, SocketAddress serverAddress, String absoluteURI)
requestAbs(io.vertx.core.http.HttpMethod, java.lang.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 to connect to a unix domain socket server.
method
- serverAddress
- absoluteURI
- @Deprecated public HttpClientRequest requestAbs(HttpMethod method, String absoluteURI, Handler<HttpClientResponse> responseHandler)
method
- the HTTP methodabsoluteURI
- the absolute URIresponseHandler
- the response handlerpublic HttpClientRequest requestAbs(HttpMethod method, SocketAddress serverAddress, String absoluteURI, Handler<HttpClientResponse> responseHandler)
requestAbs(io.vertx.core.http.HttpMethod, java.lang.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 to connect to a unix domain socket server.
method
- serverAddress
- absoluteURI
- responseHandler
- public HttpClientRequest get(RequestOptions options)
options
- the request optionspublic HttpClientRequest get(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest get(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest get(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest get(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest get(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest get(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest get(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest getAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest getAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated public HttpClient getNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClient getNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient getNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient getNow(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest post(RequestOptions options)
options
- the request optionspublic HttpClientRequest post(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest post(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest post(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest post(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest post(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest post(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest post(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest postAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest postAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handlerpublic HttpClientRequest head(RequestOptions options)
options
- the request optionspublic HttpClientRequest head(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest head(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest head(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest head(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest head(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest head(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest head(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest headAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest headAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated public HttpClient headNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClient headNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient headNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient headNow(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest options(RequestOptions options)
options
- the request optionspublic HttpClientRequest options(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest options(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest options(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest options(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest options(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest options(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest options(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest optionsAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest optionsAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated public HttpClient optionsNow(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClient optionsNow(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient optionsNow(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClient optionsNow(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest put(RequestOptions options)
options
- the request optionspublic HttpClientRequest put(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest put(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest put(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest put(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest put(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest put(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest put(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest putAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest putAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handlerpublic HttpClientRequest delete(RequestOptions options)
options
- the request optionspublic HttpClientRequest delete(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic HttpClientRequest delete(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public HttpClientRequest delete(RequestOptions options, Handler<HttpClientResponse> responseHandler)
options
- the request optionsresponseHandler
- the response handler@Deprecated public HttpClientRequest delete(int port, String host, String requestURI, Handler<HttpClientResponse> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handler@Deprecated public HttpClientRequest delete(String host, String requestURI, Handler<HttpClientResponse> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest delete(String requestURI)
requestURI
- the relative URI@Deprecated public HttpClientRequest delete(String requestURI, Handler<HttpClientResponse> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerpublic HttpClientRequest deleteAbs(String absoluteURI)
absoluteURI
- the absolute URI@Deprecated public HttpClientRequest deleteAbs(String absoluteURI, Handler<HttpClientResponse> responseHandler)
absoluteURI
- the absolute URIresponseHandler
- the response handler@Deprecated public HttpClient websocket(RequestOptions options, Handler<WebSocket> wsConnect)
options
- the request optionswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(int port, String host, String requestURI, Handler<WebSocket> wsConnect)
port
- the porthost
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(RequestOptions options, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
options
- the request optionswsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated public HttpClient websocket(int port, String host, String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
port
- 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 public HttpClient websocket(String host, String requestURI, Handler<WebSocket> wsConnect)
host
- the hostrequestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String host, String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
host
- 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 public HttpClient websocket(RequestOptions options, MultiMap headers, Handler<WebSocket> wsConnect)
options
- the request optionsheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(RequestOptions options, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
options
- 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 public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
port
- 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 public HttpClient websocket(String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
host
- the hostrequestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
host
- 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 public HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
options
- the request optionsheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
options
- 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 public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
port
- 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 public HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
host
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
host
- 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 public HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
options
- the request optionsheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usewsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
port
- 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 public HttpClient websocketAbs(String url, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
url
- 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 public HttpClient websocket(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
options
- 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 public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
port
- 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 public HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
host
- 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 public HttpClient websocket(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
host
- 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 public HttpClient websocket(String requestURI, Handler<WebSocket> wsConnect)
requestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String requestURI, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
requestURI
- the relative URIwsConnect
- handler that will be called with the WebSocket when connectedfailureHandler
- handler that will be called if WebSocket connection fails@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, Handler<WebSocket> wsConnect)
requestURI
- the relative URIheaders
- the headerswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
requestURI
- 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 public HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect)
requestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionwsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
requestURI
- 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 public HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect)
requestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocolswsConnect
- handler that will be called with the WebSocket when connected@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols, Handler<WebSocket> wsConnect, Handler<Throwable> failureHandler)
requestURI
- 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 failspublic void 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 connected@Deprecated public Observable<WebSocket> webSocketObservable(int port, String host, String requestURI)
rxWebSocket(int, java.lang.String, java.lang.String)
insteadport
- the porthost
- the hostrequestURI
- the relative URIpublic Single<WebSocket> rxWebSocket(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URIpublic void webSocket(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
host
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connected@Deprecated public Observable<WebSocket> webSocketObservable(String host, String requestURI)
rxWebSocket(int, java.lang.String, java.lang.String)
insteadhost
- the hostrequestURI
- the relative URIpublic Single<WebSocket> rxWebSocket(String host, String requestURI)
host
- the hostrequestURI
- the relative URIpublic void webSocket(String requestURI, Handler<AsyncResult<WebSocket>> handler)
requestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connected@Deprecated public Observable<WebSocket> webSocketObservable(String requestURI)
rxWebSocket(int, java.lang.String, java.lang.String)
insteadrequestURI
- the relative URIpublic Single<WebSocket> rxWebSocket(String requestURI)
requestURI
- the relative URIpublic void webSocket(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)
options
- the request optionshandler
- @Deprecated public Observable<WebSocket> webSocketObservable(WebSocketConnectOptions options)
rxWebSocket(int, java.lang.String, java.lang.String)
insteadoptions
- the request optionspublic Single<WebSocket> rxWebSocket(WebSocketConnectOptions options)
options
- the request optionspublic void 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 public Observable<WebSocket> webSocketAbsObservable(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols)
rxWebSocketAbs(java.lang.String, io.vertx.rxjava.core.MultiMap, io.vertx.core.http.WebsocketVersion, java.util.List<java.lang.String>)
insteadurl
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to usepublic Single<WebSocket> rxWebSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols)
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated public ReadStream<WebSocket> websocketStream(RequestOptions options)
options
- the request options@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI)
port
- the porthost
- the hostrequestURI
- the relative URI@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI)
host
- the hostrequestURI
- the relative URI@Deprecated public ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers)
options
- the request optionsheaders
- the headers@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headers@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers)
host
- the hostrequestURI
- the relative URIheaders
- the headers@Deprecated public ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version)
options
- the request optionsheaders
- the headersversion
- the WebSocket version@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, WebsocketVersion version)
host
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated public ReadStream<WebSocket> websocketStreamAbs(String url, MultiMap headers, WebsocketVersion version, String subProtocols)
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated public ReadStream<WebSocket> websocketStream(RequestOptions options, MultiMap headers, WebsocketVersion version, String subProtocols)
options
- the request optionsheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
host
- the hostrequestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI)
requestURI
- the relative URI@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers)
requestURI
- the relative URIheaders
- the headers@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, WebsocketVersion version)
requestURI
- the relative URIheaders
- the headersversion
- the WebSocket version@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, WebsocketVersion version, String subProtocols)
requestURI
- the relative URIheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocolspublic HttpClient connectionHandler(Handler<HttpConnection> handler)
handler
- public 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
is returned, the client will send this new request
The handler must return a Future
unsent so the client can further configure it and send it.
handler
- the new redirect handlerpublic void close()
public static HttpClient newInstance(HttpClient arg)
Copyright © 2023 Eclipse. All rights reserved.