public interface WebClient
Use static factory methods create()
or create(String)
,
or builder()
to prepare an instance.
For examples with a response body see
retrieve()
and
exchange()
.
For examples with a request body see
body(Publisher,Class)
,
syncBody(Object)
, and
body(BodyInserter)
.
Modifier and Type | Interface and Description |
---|---|
static interface |
WebClient.Builder
A mutable builder for creating a
WebClient . |
static interface |
WebClient.RequestBodySpec |
static interface |
WebClient.RequestBodyUriSpec |
static interface |
WebClient.RequestHeadersSpec<S extends WebClient.RequestHeadersSpec<S>>
Contract for specifying request headers leading up to the exchange.
|
static interface |
WebClient.RequestHeadersUriSpec<S extends WebClient.RequestHeadersSpec<S>> |
static interface |
WebClient.ResponseSpec |
static interface |
WebClient.UriSpec<S extends WebClient.RequestHeadersSpec<?>>
Contract for specifying the URI for a request.
|
Modifier and Type | Method and Description |
---|---|
static WebClient.Builder |
builder()
Obtain a
WebClient builder. |
static WebClient |
create()
Create a new
WebClient with a Reactor Netty connector. |
static WebClient |
create(String baseUrl)
A variant of
create() that accepts a default base URL. |
WebClient.RequestHeadersUriSpec<?> |
delete()
Prepare an HTTP DELETE request.
|
WebClient.RequestHeadersUriSpec<?> |
get()
Prepare an HTTP GET request.
|
WebClient.RequestHeadersUriSpec<?> |
head()
Prepare an HTTP HEAD request.
|
WebClient.RequestBodyUriSpec |
method(HttpMethod method)
Prepare a request for the specified
HttpMethod . |
WebClient.Builder |
mutate()
Return a builder for a new
WebClient with properties replicated
from the current WebClient instance, but without affecting it. |
WebClient.RequestHeadersUriSpec<?> |
options()
Prepare an HTTP OPTIONS request.
|
WebClient.RequestBodyUriSpec |
patch()
Prepare an HTTP PATCH request.
|
WebClient.RequestBodyUriSpec |
post()
Prepare an HTTP POST request.
|
WebClient.RequestBodyUriSpec |
put()
Prepare an HTTP PUT request.
|
WebClient.RequestHeadersUriSpec<?> get()
WebClient.RequestHeadersUriSpec<?> head()
WebClient.RequestBodyUriSpec post()
WebClient.RequestBodyUriSpec put()
WebClient.RequestBodyUriSpec patch()
WebClient.RequestHeadersUriSpec<?> delete()
WebClient.RequestHeadersUriSpec<?> options()
WebClient.RequestBodyUriSpec method(HttpMethod method)
HttpMethod
.WebClient.Builder mutate()
WebClient
with properties replicated
from the current WebClient
instance, but without affecting it.static WebClient create()
WebClient
with a Reactor Netty connector.create(String)
,
builder()
static WebClient create(String baseUrl)
create()
that accepts a default base URL. For more
details see Builder.baseUrl(String)
.baseUrl
- the base URI for all requestsbuilder()
static WebClient.Builder builder()
WebClient
builder.