public class WebClientBase extends Object implements WebClientInternal
| Constructor and Description |
|---|
WebClientBase(HttpClient client,
WebClientOptions options) |
| Modifier and Type | Method and Description |
|---|---|
WebClientInternal |
addInterceptor(Handler<HttpContext<?>> interceptor)
Add interceptor in the chain.
|
void |
close()
Close the client.
|
<T> HttpContext<T> |
createContext(Handler<AsyncResult<HttpResponse<T>>> handler) |
HttpRequest<Buffer> |
delete(int port,
String host,
String requestURI)
Create an HTTP DELETE request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
delete(String requestURI)
Create an HTTP DELETE request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
delete(String host,
String requestURI)
Create an HTTP DELETE request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
deleteAbs(String absoluteURI)
Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
get(int port,
String host,
String requestURI)
Create an HTTP GET request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
get(String requestURI)
Create an HTTP GET request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
get(String host,
String requestURI)
Create an HTTP GET request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
getAbs(String absoluteURI)
Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
head(int port,
String host,
String requestURI)
Create an HTTP HEAD request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
head(String requestURI)
Create an HTTP HEAD request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
head(String host,
String requestURI)
Create an HTTP HEAD request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
headAbs(String absoluteURI)
Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
patch(int port,
String host,
String requestURI)
Create an HTTP PATCH request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
patch(String requestURI)
Create an HTTP PATCH request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
patch(String host,
String requestURI)
Create an HTTP PATCH request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
patchAbs(String absoluteURI)
Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
post(int port,
String host,
String requestURI)
Create an HTTP POST request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
post(String requestURI)
Create an HTTP POST request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
post(String host,
String requestURI)
Create an HTTP POST request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
postAbs(String absoluteURI)
Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
put(int port,
String host,
String requestURI)
Create an HTTP PUT request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
put(String requestURI)
Create an HTTP PUT request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
put(String host,
String requestURI)
Create an HTTP PUT request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
putAbs(String absoluteURI)
Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
raw(String customHttpMethod,
int port,
String host,
String requestURI)
Create a request with a custom HTTP method to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
raw(String customHttpMethod,
String requestURI)
Create a request with a custom HTTP method to send to the server at the default host and port.
|
HttpRequest<Buffer> |
raw(String customHttpMethod,
String host,
String requestURI)
Create a request with a custom HTTP method to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
rawAbs(String customHttpMethod,
String absoluteURI)
Create a request with a custom HTTP method to send to the server using an absolute URI, specifying a response handler to receive
the response
|
HttpRequest<Buffer> |
request(HttpMethod method,
int port,
String host,
String requestURI)
Create an HTTP request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
request(HttpMethod method,
RequestOptions requestOptions)
Create an HTTP request to send to the server at the specified host and port.
|
HttpRequest<Buffer> |
request(HttpMethod method,
SocketAddress serverAddress,
int port,
String host,
String requestURI)
Like
WebClient.request(HttpMethod, int, String, String) using the serverAddress parameter to connect to the
server instead of the port and host parameters. |
HttpRequest<Buffer> |
request(HttpMethod method,
SocketAddress serverAddress,
RequestOptions requestOptions)
Like
WebClient.request(HttpMethod, RequestOptions) using the serverAddress parameter to connect to the
server instead of the options parameter. |
HttpRequest<Buffer> |
request(HttpMethod method,
SocketAddress serverAddress,
String requestURI)
Like
WebClient.request(HttpMethod, String) using the serverAddress parameter to connect to the
server instead of the default port and default host. |
HttpRequest<Buffer> |
request(HttpMethod method,
SocketAddress serverAddress,
String host,
String requestURI)
Like
WebClient.request(HttpMethod, String, String) using the serverAddress parameter to connect to the
server instead of the default port and host parameter. |
HttpRequest<Buffer> |
request(HttpMethod method,
String requestURI)
Create an HTTP request to send to the server at the default host and port.
|
HttpRequest<Buffer> |
request(HttpMethod method,
String host,
String requestURI)
Create an HTTP request to send to the server at the specified host and default port.
|
HttpRequest<Buffer> |
requestAbs(HttpMethod method,
SocketAddress serverAddress,
String surl)
Like
WebClient.requestAbs(HttpMethod, String) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter. |
HttpRequest<Buffer> |
requestAbs(HttpMethod method,
String surl)
Create an HTTP request to send to the server using an absolute URI
|
public WebClientBase(HttpClient client, WebClientOptions options)
public HttpRequest<Buffer> get(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> get(String requestURI)
WebClientpublic HttpRequest<Buffer> get(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> getAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> post(String requestURI)
WebClientpublic HttpRequest<Buffer> post(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> post(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> put(String requestURI)
WebClientpublic HttpRequest<Buffer> put(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> put(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> delete(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> delete(String requestURI)
WebClientpublic HttpRequest<Buffer> delete(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> patch(String requestURI)
WebClientpublic HttpRequest<Buffer> patch(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> patch(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> head(String requestURI)
WebClientpublic HttpRequest<Buffer> head(String host, String requestURI)
WebClientpublic HttpRequest<Buffer> head(int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> raw(String customHttpMethod, String requestURI)
WebClientpublic HttpRequest<Buffer> raw(String customHttpMethod, int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> raw(String customHttpMethod, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> postAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> putAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> deleteAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> patchAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> headAbs(String absoluteURI)
WebClientpublic HttpRequest<Buffer> rawAbs(String customHttpMethod, String absoluteURI)
WebClientpublic HttpRequest<Buffer> request(HttpMethod method, String requestURI)
WebClientpublic HttpRequest<Buffer> request(HttpMethod method, SocketAddress serverAddress, String requestURI)
WebClientWebClient.request(HttpMethod, String) using the serverAddress parameter to connect to the
server instead of the default port and default host.
The request host header will still be created from the default port and default host.
Use SocketAddress.domainSocketAddress(String) to connect to a unix domain socket server.
public HttpRequest<Buffer> request(HttpMethod method, RequestOptions requestOptions)
WebClientpublic HttpRequest<Buffer> request(HttpMethod method, SocketAddress serverAddress, RequestOptions requestOptions)
WebClientWebClient.request(HttpMethod, RequestOptions) using the serverAddress parameter to connect to the
server instead of the options parameter.
The request host header will still be created from the options parameter.
Use SocketAddress.domainSocketAddress(String) to connect to a unix domain socket server.
public HttpRequest<Buffer> request(HttpMethod method, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> request(HttpMethod method, SocketAddress serverAddress, String host, String requestURI)
WebClientWebClient.request(HttpMethod, String, String) using the serverAddress parameter to connect to the
server instead of the default port and host parameter.
The request host header will still be created from the default port and host parameter.
Use SocketAddress.domainSocketAddress(String) to connect to a unix domain socket server.
public HttpRequest<Buffer> request(HttpMethod method, int port, String host, String requestURI)
WebClientpublic HttpRequest<Buffer> request(HttpMethod method, SocketAddress serverAddress, int port, String host, String requestURI)
WebClientWebClient.request(HttpMethod, int, String, String) using the serverAddress parameter to connect to the
server instead of the port and host parameters.
The request host header will still be created from the port and host parameters.
Use SocketAddress.domainSocketAddress(String) to connect to a unix domain socket server.
public HttpRequest<Buffer> requestAbs(HttpMethod method, String surl)
WebClientrequestAbs in interface WebClientmethod - the HTTP methodsurl - the absolute URIpublic HttpRequest<Buffer> requestAbs(HttpMethod method, SocketAddress serverAddress, String surl)
WebClientWebClient.requestAbs(HttpMethod, String) using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the absoluteURI parameter.
Use SocketAddress.domainSocketAddress(String) to connect to a unix domain socket server.
requestAbs in interface WebClientpublic WebClientInternal addInterceptor(Handler<HttpContext<?>> interceptor)
WebClientInternalHttpContext.get(String)/HttpContext.set(String, Object).
A request/response can be processed several times (in case of retry) and thus they should use the per request state
to ensure an operation is not done twice.
This API is internal.addInterceptor in interface WebClientInternalinterceptor - the interceptor to add, must not be nullpublic <T> HttpContext<T> createContext(Handler<AsyncResult<HttpResponse<T>>> handler)
createContext in interface WebClientInternalCopyright © 2020. All rights reserved.