Class HttpClient
- java.lang.Object
-
- io.vertx.mutiny.core.http.HttpClient
-
- All Implemented Interfaces:
Measured
public class HttpClient extends Object implements Measured
An asynchronous HTTP client.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 theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<HttpClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description HttpClient(io.vertx.core.http.HttpClient delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()HttpClientconnectionHandler(Consumer<HttpConnection> handler)HttpClientRequestdelete(int port, String host, String requestURI)HttpClientRequestdelete(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestdelete(io.vertx.core.http.RequestOptions options)HttpClientRequestdelete(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestdelete(String requestURI)HttpClientRequestdelete(String host, String requestURI)HttpClientRequestdelete(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestdelete(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestdeleteAbs(String absoluteURI)HttpClientRequestdeleteAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.booleanequals(Object o)HttpClientRequestget(int port, String host, String requestURI)HttpClientRequestget(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestget(io.vertx.core.http.RequestOptions options)HttpClientRequestget(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestget(String requestURI)HttpClientRequestget(String host, String requestURI)HttpClientRequestget(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestget(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestgetAbs(String absoluteURI)HttpClientRequestgetAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.io.vertx.core.http.HttpClientgetDelegate()HttpClientgetNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientgetNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientgetNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientgetNow(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.inthashCode()HttpClientRequesthead(int port, String host, String requestURI)HttpClientRequesthead(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequesthead(io.vertx.core.http.RequestOptions options)HttpClientRequesthead(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequesthead(String requestURI)HttpClientRequesthead(String host, String requestURI)HttpClientRequesthead(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequesthead(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestheadAbs(String absoluteURI)HttpClientRequestheadAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientheadNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientheadNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientheadNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientheadNow(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.booleanisMetricsEnabled()static HttpClientnewInstance(io.vertx.core.http.HttpClient arg)HttpClientRequestoptions(int port, String host, String requestURI)HttpClientRequestoptions(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestoptions(io.vertx.core.http.RequestOptions options)HttpClientRequestoptions(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestoptions(String requestURI)HttpClientRequestoptions(String host, String requestURI)HttpClientRequestoptions(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestoptions(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestoptionsAbs(String absoluteURI)HttpClientRequestoptionsAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientoptionsNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientoptionsNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientoptionsNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientoptionsNow(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestpost(int port, String host, String requestURI)HttpClientRequestpost(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestpost(io.vertx.core.http.RequestOptions options)HttpClientRequestpost(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestpost(String requestURI)HttpClientRequestpost(String host, String requestURI)HttpClientRequestpost(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestpost(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestpostAbs(String absoluteURI)HttpClientRequestpostAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestput(int port, String host, String requestURI)HttpClientRequestput(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestput(io.vertx.core.http.RequestOptions options)HttpClientRequestput(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestput(String requestURI)HttpClientRequestput(String host, String requestURI)HttpClientRequestput(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestput(String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestputAbs(String absoluteURI)HttpClientRequestputAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientredirectHandler(Function<HttpClientResponse,Future<HttpClientRequest>> handler)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, io.vertx.core.http.RequestOptions options)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, io.vertx.core.http.RequestOptions options)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, String requestURI)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, String host, String requestURI)HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestrequest(io.vertx.core.http.HttpMethod method, String requestURI, Consumer<HttpClientResponse> responseHandler)Deprecated.HttpClientRequestrequestAbs(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, String absoluteURI)HttpClientRequestrequestAbs(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, String absoluteURI, Consumer<HttpClientResponse> responseHandler)HttpClientRequestrequestAbs(io.vertx.core.http.HttpMethod method, String absoluteURI)HttpClientRequestrequestAbs(io.vertx.core.http.HttpMethod method, String absoluteURI, Consumer<HttpClientResponse> responseHandler)Deprecated.StringtoString()HttpClientwebsocket(int port, String host, String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(int port, String host, String requestURI, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, MultiMap headers, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(io.vertx.core.http.RequestOptions options, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String host, String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String host, String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String host, String requestURI, Consumer<WebSocket> wsConnect)Deprecated.HttpClientwebsocket(String requestURI, Consumer<WebSocket> wsConnect)Deprecated.io.smallrye.mutiny.Uni<WebSocket>webSocket(int port, String host, String requestURI)Connect a WebSocket to the specified port, host and relative request URIio.smallrye.mutiny.Uni<WebSocket>webSocket(io.vertx.core.http.WebSocketConnectOptions options)Connect a WebSocket with the specified options.io.smallrye.mutiny.Uni<WebSocket>webSocket(String requestURI)Connect a WebSocket at the relative request URI using the default host and portio.smallrye.mutiny.Uni<WebSocket>webSocket(String host, String requestURI)Connect a WebSocket to the host and relative request URI and default portHttpClientwebsocketAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)Deprecated.io.smallrye.mutiny.Uni<WebSocket>webSocketAbs(String url, MultiMap headers, io.vertx.core.http.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.WebSocketwebSocketAbsAndAwait(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)Blocking variant ofio.vertx.mutiny.core.http.HttpClient#webSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List.) WebSocketwebSocketAndAwait(int port, String host, String requestURI)Blocking variant ofwebSocket(int,String,String).WebSocketwebSocketAndAwait(io.vertx.core.http.WebSocketConnectOptions options)Blocking variant ofwebSocket(WebSocketConnectOptions).WebSocketwebSocketAndAwait(String requestURI)Blocking variant ofwebSocket(String).WebSocketwebSocketAndAwait(String host, String requestURI)Blocking variant ofwebSocket(String,String).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, io.vertx.core.http.WebsocketVersion version)Deprecated.ReadStream<WebSocket>websocketStream(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)Deprecated.ReadStream<WebSocket>websocketStream(io.vertx.core.http.RequestOptions options)Deprecated.ReadStream<WebSocket>websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers)Deprecated.ReadStream<WebSocket>websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version)Deprecated.ReadStream<WebSocket>websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.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, io.vertx.core.http.WebsocketVersion version)Deprecated.ReadStream<WebSocket>websocketStream(String requestURI, MultiMap headers, io.vertx.core.http.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, io.vertx.core.http.WebsocketVersion version)Deprecated.ReadStream<WebSocket>websocketStream(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)Deprecated.ReadStream<WebSocket>websocketStreamAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)Deprecated.
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<HttpClient> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public io.vertx.core.http.HttpClient getDelegate()
- Specified by:
getDelegatein interfaceMeasured
-
isMetricsEnabled
public boolean isMetricsEnabled()
- Specified by:
isMetricsEnabledin interfaceMeasured- Returns:
trueif metrics are enabled
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, io.vertx.core.http.RequestOptions options)
- Parameters:
method-serverAddress-options-- Returns:
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, io.vertx.core.http.RequestOptions options)
- Parameters:
method- the HTTP methodoptions- the request options- Returns:
- an HTTP client request object
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
- Parameters:
method- the HTTP methodport- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI)
- Parameters:
method-serverAddress-port-host-requestURI-- Returns:
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, String host, String requestURI)
- Parameters:
method- the HTTP methodhost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
request
@Deprecated public HttpClientRequest request(io.vertx.core.http.HttpMethod method, io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
method- the HTTP methodoptions- the request optionsresponseHandler-- Returns:
- an HTTP client request object
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
- Parameters:
method-serverAddress-options-responseHandler-- Returns:
-
request
@Deprecated public HttpClientRequest request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
method- the HTTP methodport- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
- Parameters:
method-serverAddress-port-host-requestURI-responseHandler-- Returns:
-
request
@Deprecated public HttpClientRequest request(io.vertx.core.http.HttpMethod method, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
method- the HTTP methodhost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
request
public HttpClientRequest request(io.vertx.core.http.HttpMethod method, String requestURI)
- Parameters:
method- the HTTP methodrequestURI- the relative URI- Returns:
- an HTTP client request object
-
request
@Deprecated public HttpClientRequest request(io.vertx.core.http.HttpMethod method, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
method- the HTTP methodrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
requestAbs
public HttpClientRequest requestAbs(io.vertx.core.http.HttpMethod method, String absoluteURI)
- Parameters:
method- the HTTP methodabsoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
requestAbs
public HttpClientRequest requestAbs(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, String absoluteURI)
- Parameters:
method-serverAddress-absoluteURI-- Returns:
-
requestAbs
@Deprecated public HttpClientRequest requestAbs(io.vertx.core.http.HttpMethod method, String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
method- the HTTP methodabsoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
requestAbs
public HttpClientRequest requestAbs(io.vertx.core.http.HttpMethod method, SocketAddress serverAddress, String absoluteURI, Consumer<HttpClientResponse> responseHandler)
- Parameters:
method-serverAddress-absoluteURI-responseHandler-- Returns:
-
get
public HttpClientRequest get(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
get
public HttpClientRequest get(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
get
public HttpClientRequest get(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
get
@Deprecated public HttpClientRequest get(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
get
@Deprecated public HttpClientRequest get(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
get
@Deprecated public HttpClientRequest get(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
get
public HttpClientRequest get(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
get
@Deprecated public HttpClientRequest get(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
getAbs
public HttpClientRequest getAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
getAbs
@Deprecated public HttpClientRequest getAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
getNow
@Deprecated public HttpClient getNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
getNow
@Deprecated public HttpClient getNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
getNow
@Deprecated public HttpClient getNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
getNow
@Deprecated public HttpClient getNow(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
post
public HttpClientRequest post(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
post
public HttpClientRequest post(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
post
public HttpClientRequest post(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
post
@Deprecated public HttpClientRequest post(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
post
@Deprecated public HttpClientRequest post(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
post
@Deprecated public HttpClientRequest post(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
post
public HttpClientRequest post(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
post
@Deprecated public HttpClientRequest post(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
postAbs
public HttpClientRequest postAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
postAbs
@Deprecated public HttpClientRequest postAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
head
public HttpClientRequest head(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
head
public HttpClientRequest head(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
head
public HttpClientRequest head(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
head
@Deprecated public HttpClientRequest head(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
head
@Deprecated public HttpClientRequest head(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
head
@Deprecated public HttpClientRequest head(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
head
public HttpClientRequest head(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
head
@Deprecated public HttpClientRequest head(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
headAbs
public HttpClientRequest headAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
headAbs
@Deprecated public HttpClientRequest headAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
headNow
@Deprecated public HttpClient headNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
headNow
@Deprecated public HttpClient headNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
headNow
@Deprecated public HttpClient headNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
headNow
@Deprecated public HttpClient headNow(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
options
public HttpClientRequest options(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
options
public HttpClientRequest options(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
options
public HttpClientRequest options(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
options
@Deprecated public HttpClientRequest options(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
options
@Deprecated public HttpClientRequest options(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
options
@Deprecated public HttpClientRequest options(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
options
public HttpClientRequest options(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
options
@Deprecated public HttpClientRequest options(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
optionsAbs
public HttpClientRequest optionsAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
optionsAbs
@Deprecated public HttpClientRequest optionsAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
optionsNow
@Deprecated public HttpClient optionsNow(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
optionsNow
@Deprecated public HttpClient optionsNow(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
optionsNow
@Deprecated public HttpClient optionsNow(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
optionsNow
@Deprecated public HttpClient optionsNow(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- a reference to this, so the API can be used fluently
-
put
public HttpClientRequest put(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
put
public HttpClientRequest put(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
put
public HttpClientRequest put(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
put
@Deprecated public HttpClientRequest put(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
put
@Deprecated public HttpClientRequest put(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
put
@Deprecated public HttpClientRequest put(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
put
public HttpClientRequest put(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
put
@Deprecated public HttpClientRequest put(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
putAbs
public HttpClientRequest putAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
putAbs
@Deprecated public HttpClientRequest putAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
delete
public HttpClientRequest delete(io.vertx.core.http.RequestOptions options)
- Parameters:
options- the request options- Returns:
- an HTTP client request object
-
delete
public HttpClientRequest delete(int port, String host, String requestURI)
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
delete
public HttpClientRequest delete(String host, String requestURI)
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- an HTTP client request object
-
delete
@Deprecated public HttpClientRequest delete(io.vertx.core.http.RequestOptions options, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
options- the request optionsresponseHandler- the response handler- Returns:
- an HTTP client request object
-
delete
@Deprecated public HttpClientRequest delete(int port, String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
delete
@Deprecated public HttpClientRequest delete(String host, String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
delete
public HttpClientRequest delete(String requestURI)
- Parameters:
requestURI- the relative URI- Returns:
- an HTTP client request object
-
delete
@Deprecated public HttpClientRequest delete(String requestURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
requestURI- the relative URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
deleteAbs
public HttpClientRequest deleteAbs(String absoluteURI)
- Parameters:
absoluteURI- the absolute URI- Returns:
- an HTTP client request object
-
deleteAbs
@Deprecated public HttpClientRequest deleteAbs(String absoluteURI, Consumer<HttpClientResponse> responseHandler)
Deprecated.- Parameters:
absoluteURI- the absolute URIresponseHandler- the response handler- Returns:
- an HTTP client request object
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
options- the request optionswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
options- the request optionswsConnect- handler that will be called with the WebSocket when connectedfailureHandler- handler that will be called if WebSocket connection fails- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
options- the request optionsheaders- the headerswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIheaders- the headerswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIheaders- the headerswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
options- the request optionsheaders- the headersversion- the WebSocket versionwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket versionwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket versionwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
options- the request optionsheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to usewsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocketAbs
@Deprecated public HttpClient websocketAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
requestURI- the relative URIwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
requestURI- the relative URIwsConnect- handler that will be called with the WebSocket when connectedfailureHandler- handler that will be called if WebSocket connection fails- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headerswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headersversion- the WebSocket versionwsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, Consumer<WebSocket> wsConnect)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocolswsConnect- handler that will be called with the WebSocket when connected- Returns:
- a reference to this, so the API can be used fluently
-
websocket
@Deprecated public HttpClient websocket(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols, io.vertx.core.Handler<WebSocket> wsConnect, Consumer<Throwable> failureHandler)
Deprecated.- Parameters:
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 fails- Returns:
- a reference to this, so the API can be used fluently
-
webSocket
public io.smallrye.mutiny.Uni<WebSocket> webSocket(int port, String host, String requestURI)
Connect a WebSocket to the specified port, host and relative request URIUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
public WebSocket webSocketAndAwait(int port, String host, String requestURI)
Blocking variant ofwebSocket(int,String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- the WebSocket instance produced by the operation
-
webSocket
public io.smallrye.mutiny.Uni<WebSocket> webSocket(String host, String requestURI)
Connect a WebSocket to the host and relative request URI and default portUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
public WebSocket webSocketAndAwait(String host, String requestURI)
Blocking variant ofwebSocket(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- the WebSocket instance produced by the operation
-
webSocket
public io.smallrye.mutiny.Uni<WebSocket> webSocket(String requestURI)
Connect a WebSocket at the relative request URI using the default host and portUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
requestURI- the relative URI- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
public WebSocket webSocketAndAwait(String requestURI)
Blocking variant ofwebSocket(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
requestURI- the relative URI- Returns:
- the WebSocket instance produced by the operation
-
webSocket
public io.smallrye.mutiny.Uni<WebSocket> webSocket(io.vertx.core.http.WebSocketConnectOptions options)
Connect a WebSocket with the specified options.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
options- the request options- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
public WebSocket webSocketAndAwait(io.vertx.core.http.WebSocketConnectOptions options)
Blocking variant ofwebSocket(WebSocketConnectOptions).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options- the request options- Returns:
- the WebSocket instance produced by the operation
-
webSocketAbs
public io.smallrye.mutiny.Uni<WebSocket> webSocketAbs(String url, MultiMap headers, io.vertx.core.http.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.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
url- the absolute urlheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
webSocketAbsAndAwait
public WebSocket webSocketAbsAndAwait(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Blocking variant ofio.vertx.mutiny.core.http.HttpClient#webSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List.) This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
url- the absolute urlheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- the WebSocket instance produced by the operation
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(io.vertx.core.http.RequestOptions options)
Deprecated.- Parameters:
options- the request options- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URI- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URI- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers)
Deprecated.- Parameters:
options- the request optionsheaders- the headers- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIheaders- the headers- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIheaders- the headers- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version)
Deprecated.- Parameters:
options- the request optionsheaders- the headersversion- the WebSocket version- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket version- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket version- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStreamAbs
@Deprecated public ReadStream<WebSocket> websocketStreamAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)
Deprecated.- Parameters:
url- the absolute urlheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(io.vertx.core.http.RequestOptions options, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)
Deprecated.- Parameters:
options- the request optionsheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(int port, String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)
Deprecated.- Parameters:
port- the porthost- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String host, String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)
Deprecated.- Parameters:
host- the hostrequestURI- the relative URIheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols to use- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI)
Deprecated.- Parameters:
requestURI- the relative URI- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headers- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headersversion- the WebSocket version- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
websocketStream
@Deprecated public ReadStream<WebSocket> websocketStream(String requestURI, MultiMap headers, io.vertx.core.http.WebsocketVersion version, String subProtocols)
Deprecated.- Parameters:
requestURI- the relative URIheaders- the headersversion- the WebSocket versionsubProtocols- the subprotocols- Returns:
- a stream emitting a WebSocket event when the client connection has been upgraded to a WebSocket
-
connectionHandler
public HttpClient connectionHandler(Consumer<HttpConnection> handler)
- Parameters:
handler-- Returns:
- a reference to this, so the API can be used fluently
-
redirectHandler
public HttpClient redirectHandler(Function<HttpClientResponse,Future<HttpClientRequest>> handler)
- Parameters:
handler- the new redirect handler- Returns:
- a reference to this, so the API can be used fluently
-
close
public void close()
-
newInstance
public static HttpClient newInstance(io.vertx.core.http.HttpClient arg)
-
-