接口的使用
org.springframework.web.reactive.function.client.ClientResponse
使用ClientResponse的程序包 程序包 说明 org.springframework.web.reactive.function.client Provides a reactiveWebClientthat builds on top of theorg.springframework.http.client.reactivereactive HTTP adapter layer.org.springframework.web.reactive.function.client.support Classes supporting theorg.springframework.web.reactive.function.clientpackage.org.springframework.web.reactive.function.client中ClientResponse的使用
返回ClientResponse的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 ClientResponseClientResponse.Builder. build()Build the response.返回变量类型为ClientResponse的类型的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<ClientResponse>ExchangeFunction. exchange(ClientRequest request)Exchange the given request for a response mono.reactor.core.publisher.Mono<ClientResponse>WebClient.RequestHeadersSpec. exchange()Perform the HTTP request and return aClientResponsewith the response status and headers.reactor.core.publisher.Mono<ClientResponse>ExchangeFilterFunction. filter(ClientRequest request, ExchangeFunction next)Apply this filter to the given request and exchange function.参数类型为ClientResponse的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 static ClientResponse.BuilderClientResponse. from(ClientResponse other)Create a builder with the status, headers, and cookies of the given response.类型变量类型为ClientResponse的org.springframework.web.reactive.function.client中的方法参数 修饰符和类型 方法 说明 static ExchangeFilterFunctionExchangeFilterFunction. 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 ExchangeFilterFunctionExchangeFilterFunction. 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.ResponseSpecWebClient.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.ResponseSpecWebClient.ResponseSpec. onStatus(Predicate<HttpStatus> 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 ExchangeFilterFunctionExchangeFilterFunctions. statusError(Predicate<HttpStatus> statusPredicate, Function<ClientResponse,? extends Throwable> exceptionFunction)Return a filter that generates an error signal when the givenHttpStatuspredicate matches.org.springframework.web.reactive.function.client.support中ClientResponse的使用
实现ClientResponse的org.springframework.web.reactive.function.client.support中的类 修饰符和类型 类 说明 classClientResponseWrapperImplementation of theClientResponseinterface that can be subclassed to adapt the request in aexchange filter function.返回ClientResponse的org.springframework.web.reactive.function.client.support中的方法 修饰符和类型 方法 说明 ClientResponseClientResponseWrapper. response()Return the wrapped request.参数类型为ClientResponse的org.springframework.web.reactive.function.client.support中的构造器 构造器 说明 ClientResponseWrapper(ClientResponse delegate)Create a newClientResponseWrapperthat wraps the given response.