class DefaultWebTestClient extends java.lang.Object implements WebTestClient
WebTestClient
.Modifier and Type | Class and Description |
---|---|
private static class |
DefaultWebTestClient.DefaultBodyContentSpec |
private static class |
DefaultWebTestClient.DefaultBodySpec<B,S extends WebTestClient.BodySpec<B,S>> |
private static class |
DefaultWebTestClient.DefaultListBodySpec<E> |
private class |
DefaultWebTestClient.DefaultRequestBodyUriSpec |
private static class |
DefaultWebTestClient.DefaultResponseSpec |
WebTestClient.BodyContentSpec, WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>, WebTestClient.Builder, WebTestClient.ControllerSpec, WebTestClient.ListBodySpec<E>, WebTestClient.MockServerSpec<B extends WebTestClient.MockServerSpec<B>>, WebTestClient.RequestBodySpec, WebTestClient.RequestBodyUriSpec, WebTestClient.RequestHeadersSpec<S extends WebTestClient.RequestHeadersSpec<S>>, WebTestClient.RequestHeadersUriSpec<S extends WebTestClient.RequestHeadersSpec<S>>, WebTestClient.ResponseSpec, WebTestClient.RouterFunctionSpec, WebTestClient.UriSpec<S extends WebTestClient.RequestHeadersSpec<?>>
Modifier and Type | Field and Description |
---|---|
private DefaultWebTestClientBuilder |
builder |
private java.util.concurrent.atomic.AtomicLong |
requestIndex |
private java.time.Duration |
timeout |
private WebClient |
webClient |
private WiretapConnector |
wiretapConnector |
WEBTESTCLIENT_REQUEST_ID
Constructor and Description |
---|
DefaultWebTestClient(WebClient.Builder clientBuilder,
ClientHttpConnector connector,
java.time.Duration timeout,
DefaultWebTestClientBuilder webTestClientBuilder) |
Modifier and Type | Method and Description |
---|---|
WebTestClient.RequestHeadersUriSpec<?> |
delete()
Prepare an HTTP DELETE request.
|
WebTestClient.RequestHeadersUriSpec<?> |
get()
Prepare an HTTP GET request.
|
private java.time.Duration |
getTimeout() |
WebTestClient.RequestHeadersUriSpec<?> |
head()
Prepare an HTTP HEAD request.
|
WebTestClient.RequestBodyUriSpec |
method(HttpMethod method)
Prepare a request for the specified
HttpMethod . |
private WebTestClient.RequestBodyUriSpec |
methodInternal(HttpMethod method) |
WebTestClient.Builder |
mutate()
Return a builder to mutate properties of this web test client.
|
WebTestClient |
mutateWith(WebTestClientConfigurer configurer)
Mutate the
WebTestClient , apply the given configurer, and build
a new instance. |
WebTestClient.RequestHeadersUriSpec<?> |
options()
Prepare an HTTP OPTIONS request.
|
WebTestClient.RequestBodyUriSpec |
patch()
Prepare an HTTP PATCH request.
|
WebTestClient.RequestBodyUriSpec |
post()
Prepare an HTTP POST request.
|
WebTestClient.RequestBodyUriSpec |
put()
Prepare an HTTP PUT request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bindToApplicationContext, bindToController, bindToRouterFunction, bindToServer, bindToWebHandler
private final WebClient webClient
private final WiretapConnector wiretapConnector
private final java.time.Duration timeout
private final DefaultWebTestClientBuilder builder
private final java.util.concurrent.atomic.AtomicLong requestIndex
DefaultWebTestClient(WebClient.Builder clientBuilder, ClientHttpConnector connector, @Nullable java.time.Duration timeout, DefaultWebTestClientBuilder webTestClientBuilder)
private java.time.Duration getTimeout()
public WebTestClient.RequestHeadersUriSpec<?> get()
WebTestClient
get
in interface WebTestClient
public WebTestClient.RequestHeadersUriSpec<?> head()
WebTestClient
head
in interface WebTestClient
public WebTestClient.RequestBodyUriSpec post()
WebTestClient
post
in interface WebTestClient
public WebTestClient.RequestBodyUriSpec put()
WebTestClient
put
in interface WebTestClient
public WebTestClient.RequestBodyUriSpec patch()
WebTestClient
patch
in interface WebTestClient
public WebTestClient.RequestHeadersUriSpec<?> delete()
WebTestClient
delete
in interface WebTestClient
public WebTestClient.RequestHeadersUriSpec<?> options()
WebTestClient
options
in interface WebTestClient
public WebTestClient.RequestBodyUriSpec method(HttpMethod method)
WebTestClient
HttpMethod
.method
in interface WebTestClient
private WebTestClient.RequestBodyUriSpec methodInternal(HttpMethod method)
public WebTestClient.Builder mutate()
WebTestClient
mutate
in interface WebTestClient
public WebTestClient mutateWith(WebTestClientConfigurer configurer)
WebTestClient
WebTestClient
, apply the given configurer, and build
a new instance. Essentially a shortcut for:
mutate().apply(configurer).build();
mutateWith
in interface WebTestClient
configurer
- the configurer to apply