Package | Description |
---|---|
org.springframework.test.web.reactive.server |
Support for testing Spring WebFlux server endpoints via
WebTestClient . |
org.springframework.web.reactive.function.client |
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive reactive HTTP adapter layer. |
Modifier and Type | Method and Description |
---|---|
WebTestClient.Builder |
WebTestClient.Builder.filter(ExchangeFilterFunction filter)
Add the given filter to the filter chain.
|
Modifier and Type | Method and Description |
---|---|
WebTestClient.Builder |
WebTestClient.Builder.filters(Consumer<List<ExchangeFilterFunction>> filtersConsumer)
Manipulate the filters with the given consumer.
|
Modifier and Type | Method and Description |
---|---|
default ExchangeFilterFunction |
ExchangeFilterFunction.andThen(ExchangeFilterFunction afterFilter)
Return a composed filter function that first applies this filter, and
then applies the given
"after" filter. |
static ExchangeFilterFunction |
ExchangeFilterFunctions.basicAuthentication()
Deprecated.
as of Spring 5.1 in favor of using
HttpHeaders.setBasicAuth(String, String) while building the request. |
static ExchangeFilterFunction |
ExchangeFilterFunctions.basicAuthentication(String username,
String password)
Return a filter that applies HTTP Basic Authentication to the request
headers via
HttpHeaders.setBasicAuth(String) and
HttpHeaders.encodeBasicAuth(String, String, Charset) . |
static ExchangeFilterFunction |
ExchangeFilterFunctions.limitResponseSize(long maxByteCount)
Consume up to the specified number of bytes from the response body and
cancel if any more data arrives.
|
static ExchangeFilterFunction |
ExchangeFilterFunction.ofRequestProcessor(Function<ClientRequest,reactor.core.publisher.Mono<ClientRequest>> processor)
Adapt the given request processor function to a filter function that only
operates on the
ClientRequest . |
static ExchangeFilterFunction |
ExchangeFilterFunction.ofResponseProcessor(Function<ClientResponse,reactor.core.publisher.Mono<ClientResponse>> processor)
Adapt the given response processor function to a filter function that
only operates on the
ClientResponse . |
static ExchangeFilterFunction |
ExchangeFilterFunctions.statusError(Predicate<HttpStatus> statusPredicate,
Function<ClientResponse,? extends Throwable> exceptionFunction)
Return a filter that generates an error signal when the given
HttpStatus predicate matches. |
Modifier and Type | Method and Description |
---|---|
default ExchangeFilterFunction |
ExchangeFilterFunction.andThen(ExchangeFilterFunction afterFilter)
Return a composed filter function that first applies this filter, and
then applies the given
"after" filter. |
WebClient.Builder |
WebClient.Builder.filter(ExchangeFilterFunction filter)
Add the given filter to the end of the filter chain.
|
default ExchangeFunction |
ExchangeFunction.filter(ExchangeFilterFunction filter)
Filter the exchange function with the given
ExchangeFilterFunction ,
resulting in a filtered ExchangeFunction . |
Modifier and Type | Method and Description |
---|---|
WebClient.Builder |
WebClient.Builder.filters(Consumer<List<ExchangeFilterFunction>> filtersConsumer)
Manipulate the filters with the given consumer.
|