Uses of Interface
org.springframework.web.reactive.function.client.ClientResponse
Package
Description
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive
reactive HTTP adapter layer.Classes supporting the
org.springframework.web.reactive.function.client
package.-
Uses of ClientResponse in org.springframework.web.reactive.function.client
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ClientResponse>
ExchangeFunction.exchange
(ClientRequest request) Exchange the given request for aClientResponse
promise.reactor.core.publisher.Mono<ClientResponse>
WebClient.RequestHeadersSpec.exchange()
Deprecated.reactor.core.publisher.Mono<ClientResponse>
ExchangeFilterFunction.filter
(ClientRequest request, ExchangeFunction next) Apply this filter to the given request and exchange function.Modifier and TypeMethodDescriptionstatic ClientResponse.Builder
ClientResponse.from
(ClientResponse other) Deprecated.as of 5.3 in favor of the instance basedmutate()
.Modifier and TypeMethodDescriptionWebClient.Builder.defaultStatusHandler
(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) Register a defaultstatus handler
to apply to every response.<V> reactor.core.publisher.Flux<V>
WebClient.RequestHeadersSpec.exchangeToFlux
(Function<ClientResponse, ? extends reactor.core.publisher.Flux<V>> responseHandler) An alternative toWebClient.RequestHeadersSpec.retrieve()
that provides more control via access to theClientResponse
.<V> reactor.core.publisher.Mono<V>
WebClient.RequestHeadersSpec.exchangeToMono
(Function<ClientResponse, ? extends reactor.core.publisher.Mono<V>> responseHandler) An alternative toWebClient.RequestHeadersSpec.retrieve()
that provides more control via access to theClientResponse
.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 theClientResponse
.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 theClientResponse
.WebClient.ResponseSpec.onRawStatus
(IntPredicate statusCodePredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) Variant ofWebClient.ResponseSpec.onStatus(Predicate, Function)
that works with raw status code values.WebClient.ResponseSpec.onStatus
(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) Provide a function to map specific error status codes to an error signal to be propagated downstream instead of the response.static ExchangeFilterFunction
ExchangeFilterFunctions.statusError
(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, ? extends Throwable> exceptionFunction) Return a filter that generates an error signal when the givenHttpStatusCode
predicate matches. -
Uses of ClientResponse in org.springframework.web.reactive.function.client.support
Modifier and TypeClassDescriptionclass
Implementation of theClientResponse
interface that can be subclassed to adapt the request in aexchange filter function
.ModifierConstructorDescriptionClientResponseWrapper
(ClientResponse delegate) Create a newClientResponseWrapper
that wraps the given response.
WebClient.RequestHeadersSpec.exchangeToMono(Function)
,WebClient.RequestHeadersSpec.exchangeToFlux(Function)
; consider also usingWebClient.RequestHeadersSpec.retrieve()
which provides access to the response status and headers viaResponseEntity
along with error status handling.