public interface WebClient extends ClientBuilderParams, Unwrappable
| Modifier and Type | Method and Description |
|---|---|
static WebClientBuilder |
builder()
Returns a new
WebClientBuilder created without a base URI. |
static WebClientBuilder |
builder(SessionProtocol sessionProtocol,
EndpointGroup endpointGroup)
|
static WebClientBuilder |
builder(String uri)
Returns a new
WebClientBuilder created with the specified base uri. |
static WebClientBuilder |
builder(URI uri)
Returns a new
WebClientBuilder created with the specified base URI. |
default HttpResponse |
delete(String path)
Sends an HTTP DELETE request.
|
HttpResponse |
execute(AggregatedHttpRequest aggregatedReq)
Sends the specified HTTP request.
|
HttpResponse |
execute(HttpRequest req)
Sends the specified HTTP request.
|
default HttpResponse |
execute(RequestHeaders headers)
Sends an empty HTTP request with the specified headers.
|
default HttpResponse |
execute(RequestHeaders headers,
byte[] content)
Sends an HTTP request with the specified headers and content.
|
default HttpResponse |
execute(RequestHeaders headers,
HttpData content)
Sends an HTTP request with the specified headers and content.
|
default HttpResponse |
execute(RequestHeaders headers,
String content)
Sends an HTTP request with the specified headers and content.
|
default HttpResponse |
execute(RequestHeaders headers,
String content,
Charset charset)
Sends an HTTP request with the specified headers and content.
|
default HttpResponse |
get(String path)
Sends an HTTP GET request.
|
default HttpResponse |
head(String path)
Sends an HTTP HEAD request.
|
static WebClient |
of()
Returns a
WebClient without a base URI using the default ClientFactory and
the default ClientOptions. |
static WebClient |
of(ClientFactory factory,
SessionProtocol protocol,
EndpointGroup endpointGroup,
ClientOptions options)
|
static WebClient |
of(ClientFactory factory,
SessionProtocol protocol,
EndpointGroup endpointGroup,
ClientOptionValue<?>... options)
|
static WebClient |
of(ClientFactory factory,
String uri,
ClientOptions options)
Deprecated.
|
static WebClient |
of(ClientFactory factory,
String uri,
ClientOptionValue<?>... options)
|
static WebClient |
of(ClientFactory factory,
URI uri,
ClientOptions options)
Deprecated.
|
static WebClient |
of(ClientFactory factory,
URI uri,
ClientOptionValue<?>... options)
Deprecated.
|
static WebClient |
of(SessionProtocol protocol,
EndpointGroup endpointGroup)
Returns a new
WebClient that connects to the specified EndpointGroup with
the SessionProtocol using the default ClientFactory and the default
ClientOptions. |
static WebClient |
of(SessionProtocol protocol,
EndpointGroup endpointGroup,
ClientOptions options)
Deprecated.
|
static WebClient |
of(SessionProtocol protocol,
EndpointGroup endpointGroup,
ClientOptionValue<?>... options)
Deprecated.
|
static WebClient |
of(String uri)
Returns a new
WebClient that connects to the specified uri using the default options. |
static WebClient |
of(String uri,
ClientOptions options)
Deprecated.
|
static WebClient |
of(String uri,
ClientOptionValue<?>... options)
Deprecated.
|
static WebClient |
of(URI uri)
|
static WebClient |
of(URI uri,
ClientOptions options)
Deprecated.
|
static WebClient |
of(URI uri,
ClientOptionValue<?>... options)
Deprecated.
|
default HttpResponse |
options(String path)
Sends an HTTP OPTIONS request.
|
default HttpResponse |
patch(String path,
byte[] content)
Sends an HTTP PATCH request with the specified content.
|
default HttpResponse |
patch(String path,
HttpData content)
Sends an HTTP PATCH request with the specified content.
|
default HttpResponse |
patch(String path,
String content)
Sends an HTTP PATCH request with the specified content.
|
default HttpResponse |
patch(String path,
String content,
Charset charset)
Sends an HTTP PATCH request with the specified content.
|
default HttpResponse |
post(String path,
byte[] content)
Sends an HTTP POST request with the specified content.
|
default HttpResponse |
post(String path,
HttpData content)
Sends an HTTP POST request with the specified content.
|
default HttpResponse |
post(String path,
String content)
Sends an HTTP POST request with the specified content.
|
default HttpResponse |
post(String path,
String content,
Charset charset)
Sends an HTTP POST request with the specified content.
|
default HttpResponse |
put(String path,
byte[] content)
Sends an HTTP PUT request with the specified content.
|
default HttpResponse |
put(String path,
HttpData content)
Sends an HTTP PUT request with the specified content.
|
default HttpResponse |
put(String path,
String content)
Sends an HTTP PUT request with the specified content.
|
default HttpResponse |
put(String path,
String content,
Charset charset)
Sends an HTTP PUT request with the specified content.
|
default HttpResponse |
trace(String path)
Sends an HTTP TRACE request.
|
absolutePathRef, clientType, endpointGroup, factory, of, of, options, scheme, uriasstatic WebClient of()
WebClient without a base URI using the default ClientFactory and
the default ClientOptions.static WebClient of(String uri)
WebClient that connects to the specified uri using the default options.uri - the URI of the server endpointIllegalArgumentException - if the scheme of the specified uri is not an HTTP schemestatic WebClient of(URI uri)
uri - the URI of the server endpointIllegalArgumentException - if the scheme of the specified URI is not an HTTP schemestatic WebClient of(SessionProtocol protocol, EndpointGroup endpointGroup)
WebClient that connects to the specified EndpointGroup with
the SessionProtocol using the default ClientFactory and the default
ClientOptions.protocol - the SessionProtocol of the EndpointGroupendpointGroup - the server EndpointGroup@Deprecated static WebClient of(String uri, ClientOptionValue<?>... options)
builder(String) and WebClientBuilder.option(ClientOptionValue).uri - the URI of the server endpointoptions - the ClientOptionValuesIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(String uri, ClientOptions options)
builder(String) and WebClientBuilder.options(ClientOptions).uri - the URI of the server endpointoptions - the ClientOptionsIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(ClientFactory factory, String uri, ClientOptionValue<?>... options)
builder(String), WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptionValue[]).factory - an alternative ClientFactoryuri - the URI of the server endpointoptions - the ClientOptionValuesIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(ClientFactory factory, String uri, ClientOptions options)
builder(String), WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptions).factory - an alternative ClientFactoryuri - the URI of the server endpointoptions - the ClientOptionsIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(URI uri, ClientOptionValue<?>... options)
builder(URI) and WebClientBuilder.options(ClientOptionValue[]).uri - the URI of the server endpointoptions - the ClientOptionValuesIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(URI uri, ClientOptions options)
builder(URI) and WebClientBuilder.options(ClientOptions).uri - the URI of the server endpointoptions - the ClientOptionsIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(ClientFactory factory, URI uri, ClientOptionValue<?>... options)
builder(URI), WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptionValue[]).factory - an alternative ClientFactoryuri - the URI of the server endpointoptions - the ClientOptionValuesIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(ClientFactory factory, URI uri, ClientOptions options)
builder(URI), WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptions).factory - an alternative ClientFactoryuri - the URI of the server endpointoptions - the ClientOptionsIllegalArgumentException - if the scheme of the specified uri is not an HTTP scheme@Deprecated static WebClient of(SessionProtocol protocol, EndpointGroup endpointGroup, ClientOptionValue<?>... options)
builder(SessionProtocol, EndpointGroup)
and WebClientBuilder.options(ClientOptionValue[]).WebClient that connects to the specified EndpointGroup with
the SessionProtocol using the default ClientFactory.protocol - the SessionProtocol of the EndpointGroupendpointGroup - the server EndpointGroupoptions - the ClientOptionValues@Deprecated static WebClient of(SessionProtocol protocol, EndpointGroup endpointGroup, ClientOptions options)
builder(SessionProtocol, EndpointGroup)
and WebClientBuilder.options(ClientOptions).WebClient that connects to the specified EndpointGroup with
the SessionProtocol using the default ClientFactory.protocol - the SessionProtocol of the EndpointGroupendpointGroup - the server EndpointGroupoptions - the ClientOptions@Deprecated static WebClient of(ClientFactory factory, SessionProtocol protocol, EndpointGroup endpointGroup, ClientOptionValue<?>... options)
builder(SessionProtocol, EndpointGroup),
WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptionValue[]).WebClient that connects to the specified EndpointGroup with
the SessionProtocol using an alternative ClientFactory.factory - an alternative ClientFactoryprotocol - the SessionProtocol of the EndpointGroupendpointGroup - the server EndpointGroupoptions - the ClientOptionValues@Deprecated static WebClient of(ClientFactory factory, SessionProtocol protocol, EndpointGroup endpointGroup, ClientOptions options)
builder(SessionProtocol, EndpointGroup),
WebClientBuilder.factory(ClientFactory)
and WebClientBuilder.options(ClientOptions).WebClient that connects to the specified EndpointGroup with
the SessionProtocol using an alternative ClientFactory.factory - an alternative ClientFactoryprotocol - the SessionProtocol of the EndpointGroupendpointGroup - the server EndpointGroupoptions - the ClientOptionsstatic WebClientBuilder builder()
WebClientBuilder created without a base URI.static WebClientBuilder builder(String uri)
WebClientBuilder created with the specified base uri.IllegalArgumentException - if the scheme of the uri is not one of the fields
in SessionProtocol or the uri violates RFC 2396static WebClientBuilder builder(URI uri)
WebClientBuilder created with the specified base URI.IllegalArgumentException - if the scheme of the uri is not one of the fields
in SessionProtocolstatic WebClientBuilder builder(SessionProtocol sessionProtocol, EndpointGroup endpointGroup)
IllegalArgumentException - if the sessionProtocol is not one of the fields
in SessionProtocolHttpResponse execute(HttpRequest req)
HttpResponse execute(AggregatedHttpRequest aggregatedReq)
default HttpResponse execute(RequestHeaders headers)
default HttpResponse execute(RequestHeaders headers, HttpData content)
default HttpResponse execute(RequestHeaders headers, byte[] content)
default HttpResponse execute(RequestHeaders headers, String content)
default HttpResponse execute(RequestHeaders headers, String content, Charset charset)
default HttpResponse options(String path)
default HttpResponse get(String path)
default HttpResponse head(String path)
default HttpResponse post(String path, HttpData content)
default HttpResponse post(String path, byte[] content)
default HttpResponse post(String path, String content)
default HttpResponse post(String path, String content, Charset charset)
default HttpResponse put(String path, HttpData content)
default HttpResponse put(String path, byte[] content)
default HttpResponse put(String path, String content)
default HttpResponse put(String path, String content, Charset charset)
default HttpResponse patch(String path, HttpData content)
default HttpResponse patch(String path, byte[] content)
default HttpResponse patch(String path, String content)
default HttpResponse patch(String path, String content, Charset charset)
default HttpResponse delete(String path)
default HttpResponse trace(String path)
Copyright © 2020 LeanCloud. All rights reserved.