| Package | Description |
|---|---|
| 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 |
|---|---|
reactor.core.publisher.Mono<ClientResponse> |
WebClient.RequestHeadersSpec.exchange()
Exchange the request for a
ClientResponse with full access
to the response status and headers before extracting the body. |
reactor.core.publisher.Mono<ClientResponse> |
ExchangeFunction.exchange(ClientRequest request)
Exchange the given request for a response mono.
|
reactor.core.publisher.Mono<ClientResponse> |
ExchangeFilterFunction.filter(ClientRequest request,
ExchangeFunction next)
Apply this filter to the given request and exchange function.
|
| Modifier and Type | Method and Description |
|---|---|
static ExchangeFilterFunction |
ExchangeFilterFunction.ofResponseProcessor(Function<ClientResponse,reactor.core.publisher.Mono<ClientResponse>> responseProcessor)
Adapt the given response processor function to a filter function that only operates on the
ClientResponse. |
static ExchangeFilterFunction |
ExchangeFilterFunction.ofResponseProcessor(Function<ClientResponse,reactor.core.publisher.Mono<ClientResponse>> responseProcessor)
Adapt the given response processor function to a filter function that only operates on the
ClientResponse. |
WebClient.ResponseSpec |
WebClient.ResponseSpec.onStatus(Predicate<org.springframework.http.HttpStatus> statusPredicate,
Function<ClientResponse,reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction)
Register a custom error function that gets invoked when the given
HttpStatus
predicate applies. |
static ExchangeFilterFunction |
ExchangeFilterFunctions.statusError(Predicate<org.springframework.http.HttpStatus> statusPredicate,
Function<ClientResponse,? extends Throwable> exceptionFunction)
Return a filter that returns a given
Throwable as response if the given
HttpStatus predicate matches. |