public interface HttpClient extends Measured
It allows you to make requests to HTTP servers, and a single client can make requests to any server.
It also allows you to open WebSockets to servers.
The client can also pool HTTP connections.
For pooling to occur, keep-alive must be true on the HttpClientOptions
(default is true).
In this case connections will be pooled and re-used if there are pending HTTP requests waiting to get a connection,
otherwise they will be closed.
This gives the benefits of keep alive when the client is loaded but means we don't keep connections hanging around unnecessarily when there would be no benefits anyway.
The client also supports pipe-lining of requests. Pipe-lining means another request is sent on the same connection before the response from the preceding one has returned. Pipe-lining is not appropriate for all requests.
To enable pipe-lining, it must be enabled on the HttpClientOptions
(default is false).
When pipe-lining is enabled the connection will be automatically closed when all in-flight responses have returned and there are no outstanding pending requests to write.
The client is designed to be reused between requests.
Modifier and Type | Method and Description |
---|---|
Future<Void> |
close()
Like
close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> handler)
Close the client.
|
HttpClient |
connectionHandler(Handler<HttpConnection> handler)
Set a connection handler for the client.
|
Future<HttpClientResponse> |
delete(int port,
String host,
String requestURI)
Like
delete(int, String, String, Handler) but returns a Future of the asynchronous result |
void |
delete(int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(int port,
String host,
String requestURI,
MultiMap headers)
Like
delete(int, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
delete(int port,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(RequestOptions options)
Like
delete(RequestOptions, Handler) but returns a Future of the asynchronous result |
void |
delete(RequestOptions options,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(String requestURI)
Like
delete(String, Handler) but returns a Future of the asynchronous result |
void |
delete(String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(String requestURI,
MultiMap headers)
Like
delete(String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
delete(String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(String host,
String requestURI)
Like
delete(String, String, Handler) but returns a Future of the asynchronous result |
void |
delete(String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
delete(String host,
String requestURI,
MultiMap headers)
Like
delete(String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
delete(String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP DELETE request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(int port,
String host,
String requestURI)
Like
get(int, String, String, Handler) but returns a Future of the asynchronous result |
void |
get(int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(int port,
String host,
String requestURI,
MultiMap headers)
Like
get(int, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
get(int port,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(RequestOptions options)
Like
get(RequestOptions, Handler) but returns a Future of the asynchronous result |
void |
get(RequestOptions options,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(String requestURI)
Like
get(String, Handler) but returns a Future of the asynchronous result |
void |
get(String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(String requestURI,
MultiMap headers)
Like
get(String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
get(String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(String host,
String requestURI)
Like
get(String, String, Handler) but returns a Future of the asynchronous result |
void |
get(String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
get(String host,
String requestURI,
MultiMap headers)
Like
get(String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
get(String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP GET request to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(int port,
String host,
String requestURI)
Like
head(int, String, String, Handler) but returns a Future of the asynchronous result |
void |
head(int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(int port,
String host,
String requestURI,
MultiMap headers)
Like
head(int, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
head(int port,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(RequestOptions options)
Like
head(RequestOptions, Handler) but returns a Future of the asynchronous result |
void |
head(RequestOptions options,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(String requestURI)
Like
head(String, Handler) but returns a Future of the asynchronous result |
void |
head(String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(String requestURI,
MultiMap headers)
Like
head(String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
head(String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(String host,
String requestURI)
Like
head(String, String, Handler) but returns a Future of the asynchronous result |
void |
head(String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
head(String host,
String requestURI,
MultiMap headers)
Like
head(String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
head(String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP HEAD request to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(int port,
String host,
String requestURI)
Like
options(int, String, String, Handler) but returns a Future of the asynchronous result |
void |
options(int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(int port,
String host,
String requestURI,
MultiMap headers)
Like
options(int, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
options(int port,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(RequestOptions options)
Like
options(RequestOptions, Handler) but returns a Future of the asynchronous result |
void |
options(RequestOptions options,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(String requestURI)
Like
options(String, Handler) but returns a Future of the asynchronous result |
void |
options(String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(String requestURI,
MultiMap headers)
Like
options(String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
options(String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(String host,
String requestURI)
Like
options(String, String, Handler) but returns a Future of the asynchronous result |
void |
options(String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
options(String host,
String requestURI,
MultiMap headers)
Like
options(String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
void |
options(String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP OPTIONS request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(int port,
String host,
String requestURI,
Buffer body)
Like
post(int, String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(int port,
String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(int port,
String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
post(int, String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(int port,
String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
post(int, String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(int port,
String host,
String requestURI,
ReadStream<Buffer> body)
Like
post(int, String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(int port,
String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(RequestOptions options,
Buffer body)
Like
post(RequestOptions, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(RequestOptions options,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(RequestOptions options,
ReadStream<Buffer> body)
Like
post(RequestOptions, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(RequestOptions options,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String requestURI,
Buffer body)
Like
post(String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String requestURI,
MultiMap headers,
Buffer body)
Like
post(String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
post(String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String requestURI,
ReadStream<Buffer> body)
Like
post(String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String host,
String requestURI,
Buffer body)
Like
post(String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
post(String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
post(String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
post(String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
post(String host,
String requestURI,
ReadStream<Buffer> body)
Like
post(String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
post(String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(int port,
String host,
String requestURI,
Buffer body)
Like
put(int, String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(int port,
String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(int port,
String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
put(int, String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(int port,
String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
put(int, String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(int port,
String host,
String requestURI,
ReadStream<Buffer> body)
Like
put(int, String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(int port,
String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(RequestOptions options,
Buffer body)
Like
put(RequestOptions, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(RequestOptions options,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(RequestOptions options,
ReadStream<Buffer> body)
Like
put(RequestOptions, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(RequestOptions options,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String requestURI,
Buffer body)
Like
put(String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String requestURI,
MultiMap headers,
Buffer body)
Like
put(String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
put(String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String requestURI,
ReadStream<Buffer> body)
Like
put(String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String host,
String requestURI,
Buffer body)
Like
put(String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
put(String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
put(String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
put(String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
put(String host,
String requestURI,
ReadStream<Buffer> body)
Like
put(String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
put(String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Function<HttpClientResponse,Future<RequestOptions>> |
redirectHandler() |
HttpClient |
redirectHandler(Function<HttpClientResponse,Future<RequestOptions>> handler)
Set a redirect handler for the http client.
|
Future<HttpClientRequest> |
request(HttpMethod method,
int port,
String host,
String requestURI)
Like
request(HttpMethod, int, String, String, Handler) but returns a Future of the asynchronous result |
void |
request(HttpMethod method,
int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the
host and port . |
Future<HttpClientRequest> |
request(HttpMethod method,
String requestURI)
Like
request(HttpMethod, String, Handler) but returns a Future of the asynchronous result |
void |
request(HttpMethod method,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the default host and port.
|
Future<HttpClientRequest> |
request(HttpMethod method,
String host,
String requestURI)
Like
request(HttpMethod, String, String, Handler) but returns a Future of the asynchronous result |
void |
request(HttpMethod method,
String host,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the
host and default port. |
Future<HttpClientRequest> |
request(RequestOptions options)
Like
request(RequestOptions, Handler) but returns a Future of the asynchronous result |
void |
request(RequestOptions options,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server.
|
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI)
Like
send(HttpMethod, int, String, String, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI,
Buffer body)
Like
send(HttpMethod, int, String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers)
Like
send(HttpMethod, int, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
send(HttpMethod, int, String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
send(HttpMethod, int, String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
int port,
String host,
String requestURI,
ReadStream<Buffer> body)
Like
send(HttpMethod, int, String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
int port,
String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI)
Like
send(HttpMethod, String, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI,
Buffer body)
Like
send(HttpMethod, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI,
MultiMap headers)
Like
send(HttpMethod, String, MultiMap, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI,
MultiMap headers,
Buffer body)
Like
send(HttpMethod, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
send(HttpMethod, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String requestURI,
ReadStream<Buffer> body)
Like
send(HttpMethod, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI)
Like
send(HttpMethod, String, String, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI,
Buffer body)
Like
send(HttpMethod, String, String, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String host,
String requestURI,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
String host,
String requestURI,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers)
Like
send(HttpMethod, String, String, MultiMap, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers,
Buffer body)
Like
send(HttpMethod, String, String, MultiMap, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
void |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body)
Like
send(HttpMethod, String, String, MultiMap, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String host,
String requestURI,
MultiMap headers,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(HttpMethod method,
String host,
String requestURI,
ReadStream<Buffer> body)
Like
send(HttpMethod, String, String, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(HttpMethod method,
String host,
String requestURI,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(RequestOptions options)
Like
send(RequestOptions, Handler) but returns a Future of the asynchronous result |
Future<HttpClientResponse> |
send(RequestOptions options,
Buffer body)
Like
send(RequestOptions, Buffer, Handler) but returns a Future of the asynchronous result |
void |
send(RequestOptions options,
Buffer body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server with the specified options, specifying a response handler to receive
the response
|
void |
send(RequestOptions options,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<HttpClientResponse> |
send(RequestOptions options,
ReadStream<Buffer> body)
Like
send(RequestOptions, ReadStream, Handler) but returns a Future of the asynchronous result |
void |
send(RequestOptions options,
ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> responseHandler)
Sends an HTTP request to send to the server with the specified options, specifying a response handler to receive
the response
|
Future<WebSocket> |
webSocket(int port,
String host,
String requestURI)
Like
webSocket(int, String, String, Handler) but returns a Future of the asynchronous result |
void |
webSocket(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the specified port, host and relative request URI
|
Future<WebSocket> |
webSocket(String requestURI)
Like
webSocket(String, Handler) but returns a Future of the asynchronous result |
void |
webSocket(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket at the relative request URI using the default host and port
|
Future<WebSocket> |
webSocket(String host,
String requestURI)
Like
webSocket(String, String, Handler) but returns a Future of the asynchronous result |
void |
webSocket(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the host and relative request URI and default port
|
Future<WebSocket> |
webSocket(WebSocketConnectOptions options)
Like
webSocket(WebSocketConnectOptions, Handler) but returns a Future of the asynchronous result |
void |
webSocket(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified options.
|
Future<WebSocket> |
webSocketAbs(String url,
MultiMap headers,
WebsocketVersion version,
List<String> subProtocols)
Like
webSocketAbs(String, MultiMap, WebsocketVersion, List, Handler) but returns a Future of the asynchronous result |
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.
|
isMetricsEnabled
void send(RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsresponseHandler
- the response handlerFuture<HttpClientResponse> send(RequestOptions options)
send(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid send(RequestOptions options, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(RequestOptions options, Buffer body)
send(RequestOptions, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(RequestOptions options, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(RequestOptions options, ReadStream<Buffer> body)
send(RequestOptions, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI, MultiMap headers)
send(HttpMethod, int, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI, MultiMap headers, Buffer body)
send(HttpMethod, int, String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
send(HttpMethod, int, String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI)
send(HttpMethod, int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI, Buffer body)
send(HttpMethod, int, String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, int port, String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, int port, String host, String requestURI, ReadStream<Buffer> body)
send(HttpMethod, int, String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI, MultiMap headers)
send(HttpMethod, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI, MultiMap headers, Buffer body)
send(HttpMethod, String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
send(HttpMethod, String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI)
send(HttpMethod, String, String, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI, Buffer body)
send(HttpMethod, String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodhost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String host, String requestURI, ReadStream<Buffer> body)
send(HttpMethod, String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI, MultiMap headers)
send(HttpMethod, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI, MultiMap headers, Buffer body)
send(HttpMethod, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI, MultiMap headers, ReadStream<Buffer> body)
send(HttpMethod, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI)
send(HttpMethod, String, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI, Buffer body)
send(HttpMethod, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid send(HttpMethod method, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
method
- the HTTP methodrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> send(HttpMethod method, String requestURI, ReadStream<Buffer> body)
send(HttpMethod, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid request(RequestOptions options, Handler<AsyncResult<HttpClientRequest>> handler)
handler
is called when the request is ready to be sent.options
- the request optionshandler
- the handler called when the request is ready to be sentFuture<HttpClientRequest> request(RequestOptions options)
request(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid request(HttpMethod method, int port, String host, String requestURI, Handler<AsyncResult<HttpClientRequest>> handler)
host
and port
. The handler
is called when the request is ready to be sent.method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URIhandler
- the handler called when the request is ready to be sentFuture<HttpClientRequest> request(HttpMethod method, int port, String host, String requestURI)
request(HttpMethod, int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid request(HttpMethod method, String host, String requestURI, Handler<AsyncResult<HttpClientRequest>> handler)
host
and default port. The handler
is called when the request is ready to be sent.method
- the HTTP methodhost
- the hostrequestURI
- the relative URIhandler
- the handler called when the request is ready to be sentFuture<HttpClientRequest> request(HttpMethod method, String host, String requestURI)
request(HttpMethod, String, String, Handler)
but returns a Future
of the asynchronous resultvoid request(HttpMethod method, String requestURI, Handler<AsyncResult<HttpClientRequest>> handler)
handler
is called when the request is ready to be sent.method
- the HTTP methodrequestURI
- the relative URIhandler
- the handler called when the request is ready to be sentFuture<HttpClientRequest> request(HttpMethod method, String requestURI)
request(HttpMethod, String, Handler)
but returns a Future
of the asynchronous resultvoid get(int port, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> get(int port, String host, String requestURI, MultiMap headers)
get(int, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid get(String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> get(String host, String requestURI, MultiMap headers)
get(String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid get(String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> get(String requestURI, MultiMap headers)
get(String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid get(RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsresponseHandler
- the response handlerFuture<HttpClientResponse> get(RequestOptions options)
get(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid get(int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> get(int port, String host, String requestURI)
get(int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid get(String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> get(String host, String requestURI)
get(String, String, Handler)
but returns a Future
of the asynchronous resultvoid get(String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> get(String requestURI)
get(String, Handler)
but returns a Future
of the asynchronous resultvoid post(int port, String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(int port, String host, String requestURI, MultiMap headers, Buffer body)
post(int, String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
post(int, String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String host, String requestURI, MultiMap headers, Buffer body)
post(String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
post(String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String requestURI, MultiMap headers, Buffer body)
post(String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String requestURI, MultiMap headers, ReadStream<Buffer> body)
post(String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(RequestOptions options, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(RequestOptions options, Buffer body)
post(RequestOptions, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(RequestOptions options, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(RequestOptions options, ReadStream<Buffer> body)
post(RequestOptions, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(int port, String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(int port, String host, String requestURI, Buffer body)
post(int, String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(int port, String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(int port, String host, String requestURI, ReadStream<Buffer> body)
post(int, String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String host, String requestURI, Buffer body)
post(String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String host, String requestURI, ReadStream<Buffer> body)
post(String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid post(String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String requestURI, Buffer body)
post(String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid post(String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> post(String requestURI, ReadStream<Buffer> body)
post(String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(int port, String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(int port, String host, String requestURI, MultiMap headers, Buffer body)
put(int, String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(int port, String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
put(int, String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(String host, String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String host, String requestURI, MultiMap headers, Buffer body)
put(String, String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(String host, String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String host, String requestURI, MultiMap headers, ReadStream<Buffer> body)
put(String, String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(String requestURI, MultiMap headers, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String requestURI, MultiMap headers, Buffer body)
put(String, MultiMap, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(String requestURI, MultiMap headers, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String requestURI, MultiMap headers, ReadStream<Buffer> body)
put(String, MultiMap, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(RequestOptions options, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(RequestOptions options, Buffer body)
put(RequestOptions, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(RequestOptions options, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(RequestOptions options, ReadStream<Buffer> body)
put(RequestOptions, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(int port, String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(int port, String host, String requestURI, Buffer body)
put(int, String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(int port, String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(int port, String host, String requestURI, ReadStream<Buffer> body)
put(int, String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(String host, String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String host, String requestURI, Buffer body)
put(String, String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(String host, String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String host, String requestURI, ReadStream<Buffer> body)
put(String, String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid put(String requestURI, Buffer body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String requestURI, Buffer body)
put(String, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid put(String requestURI, ReadStream<Buffer> body, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIbody
- the request bodyresponseHandler
- the response handlerFuture<HttpClientResponse> put(String requestURI, ReadStream<Buffer> body)
put(String, ReadStream, Handler)
but returns a Future
of the asynchronous resultvoid head(int port, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> head(int port, String host, String requestURI, MultiMap headers)
head(int, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid head(String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> head(String host, String requestURI, MultiMap headers)
head(String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid head(String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> head(String requestURI, MultiMap headers)
head(String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid head(RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsresponseHandler
- the response handlerFuture<HttpClientResponse> head(RequestOptions options)
head(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid head(int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> head(int port, String host, String requestURI)
head(int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid head(String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> head(String host, String requestURI)
head(String, String, Handler)
but returns a Future
of the asynchronous resultvoid head(String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> head(String requestURI)
head(String, Handler)
but returns a Future
of the asynchronous resultvoid options(int port, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> options(int port, String host, String requestURI, MultiMap headers)
options(int, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid options(String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> options(String host, String requestURI, MultiMap headers)
options(String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid options(String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> options(String requestURI, MultiMap headers)
options(String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid options(RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsresponseHandler
- the response handlerFuture<HttpClientResponse> options(RequestOptions options)
options(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid options(int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> options(int port, String host, String requestURI)
options(int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid options(String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> options(String host, String requestURI)
options(String, String, Handler)
but returns a Future
of the asynchronous resultvoid options(String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> options(String requestURI)
options(String, Handler)
but returns a Future
of the asynchronous resultvoid delete(int port, String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> delete(int port, String host, String requestURI, MultiMap headers)
delete(int, String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid delete(String host, String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> delete(String host, String requestURI, MultiMap headers)
delete(String, String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid delete(String requestURI, MultiMap headers, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIheaders
- the headersresponseHandler
- the response handlerFuture<HttpClientResponse> delete(String requestURI, MultiMap headers)
delete(String, MultiMap, Handler)
but returns a Future
of the asynchronous resultvoid delete(RequestOptions options, Handler<AsyncResult<HttpClientResponse>> responseHandler)
options
- the request optionsresponseHandler
- the response handlerFuture<HttpClientResponse> delete(RequestOptions options)
delete(RequestOptions, Handler)
but returns a Future
of the asynchronous resultvoid delete(int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
port
- the porthost
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> delete(int port, String host, String requestURI)
delete(int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid delete(String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
host
- the hostrequestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> delete(String host, String requestURI)
delete(String, String, Handler)
but returns a Future
of the asynchronous resultvoid delete(String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
requestURI
- the relative URIresponseHandler
- the response handlerFuture<HttpClientResponse> delete(String requestURI)
delete(String, Handler)
but returns a Future
of the asynchronous resultvoid 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 connectedFuture<WebSocket> webSocket(int port, String host, String requestURI)
webSocket(int, String, String, Handler)
but returns a Future
of the asynchronous resultvoid webSocket(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
host
- the hostrequestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connectedFuture<WebSocket> webSocket(String host, String requestURI)
webSocket(String, String, Handler)
but returns a Future
of the asynchronous resultvoid webSocket(String requestURI, Handler<AsyncResult<WebSocket>> handler)
requestURI
- the relative URIhandler
- handler that will be called with the WebSocket when connectedFuture<WebSocket> webSocket(String requestURI)
webSocket(String, Handler)
but returns a Future
of the asynchronous resultvoid webSocket(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)
options
- the request optionsFuture<WebSocket> webSocket(WebSocketConnectOptions options)
webSocket(WebSocketConnectOptions, Handler)
but returns a Future
of the asynchronous resultvoid 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 failsFuture<WebSocket> webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols)
webSocketAbs(String, MultiMap, WebsocketVersion, List, Handler)
but returns a Future
of the asynchronous resultHttpClient connectionHandler(Handler<HttpConnection> handler)
HttpClient redirectHandler(Function<HttpClientResponse,Future<RequestOptions>> handler)
The redirect handler is called when a 3xx
response is received and the request is configured to
follow redirects with HttpClientRequest.setFollowRedirects(boolean)
.
The redirect handler is passed the HttpClientResponse
, it can return an HttpClientRequest
or null
.
Future<HttpClientRequest>
is returned, the client will send this new request
The handler must return a Future<HttpClientRequest>
unsent so the client can further configure it and send it.
handler
- the new redirect handlerFunction<HttpClientResponse,Future<RequestOptions>> redirectHandler()
void close(Handler<AsyncResult<Void>> handler)
Future<Void> close()
close(Handler)
but returns a Future
of the asynchronous resultCopyright © 2020 Eclipse. All rights reserved.