インターフェースの使用
org.springframework.web.reactive.function.client.ClientResponse
ClientResponse を使用するパッケージ
パッケージ
説明
org.springframework.http.client.reactive
リアクティブ HTTP アダプター層上に構築されるリアクティブ WebClient
を提供します。org.springframework.web.reactive.function.client
パッケージをサポートするクラス。org.springframework.web.reactive.function.client 内の ClientResponse 使用
型 ClientResponse の引数を持つ型を返す org.springframework.web.reactive.function.client のメソッド修飾子と型メソッド説明reactor.core.publisher.Mono<ClientResponse>
ExchangeFunction.exchange
(ClientRequest request) 与えられたリクエストをClientResponse
プロミスと交換します。reactor.core.publisher.Mono<ClientResponse>
使用すべきではありません。reactor.core.publisher.Mono<ClientResponse>
ExchangeFilterFunction.filter
(ClientRequest request, ExchangeFunction next) このフィルターを所定のリクエストおよび交換関数に適用します。型 ClientResponse のパラメーターを持つ org.springframework.web.reactive.function.client のメソッド修飾子と型メソッド説明static ClientResponse.Builder
ClientResponse.from
(ClientResponse other) 使用すべきではありません。5.3 以降では、インスタンスベースのmutate()
が使用されます。型 ClientResponse の型引数を持つ org.springframework.web.reactive.function.client のメソッドパラメーター修飾子と型メソッド説明WebClient.Builder.defaultStatusHandler
(PredicateSE<HttpStatusCode> statusPredicate, FunctionSE<ClientResponse, reactor.core.publisher.Mono<? extends ThrowableSE>> exceptionFunction) すべてのレスポンスに適用するデフォルトのstatus handler
を登録します。<V> reactor.core.publisher.Flux<V>
WebClient.RequestHeadersSpec.exchangeToFlux
(FunctionSE<ClientResponse, ? extends reactor.core.publisher.Flux<V>> responseHandler) ClientResponse
へのアクセスを介してより多くの制御を提供するWebClient.RequestHeadersSpec.retrieve()
の代替。<V> reactor.core.publisher.Mono<V>
WebClient.RequestHeadersSpec.exchangeToMono
(FunctionSE<ClientResponse, ? extends reactor.core.publisher.Mono<V>> responseHandler) ClientResponse
へのアクセスを介してより多くの制御を提供するWebClient.RequestHeadersSpec.retrieve()
の代替。static ExchangeFilterFunction
ExchangeFilterFunction.ofResponseProcessor
(FunctionSE<ClientResponse, reactor.core.publisher.Mono<ClientResponse>> processor) ClientResponse
でのみ動作するフィルター関数に、指定されたレスポンスプロセッサー関数を適合させます。static ExchangeFilterFunction
ExchangeFilterFunction.ofResponseProcessor
(FunctionSE<ClientResponse, reactor.core.publisher.Mono<ClientResponse>> processor) ClientResponse
でのみ動作するフィルター関数に、指定されたレスポンスプロセッサー関数を適合させます。WebClient.ResponseSpec.onRawStatus
(IntPredicateSE statusCodePredicate, FunctionSE<ClientResponse, reactor.core.publisher.Mono<? extends ThrowableSE>> exceptionFunction) 生のステータスコード値を処理するWebClient.ResponseSpec.onStatus(Predicate, Function)
のバリアント。WebClient.ResponseSpec.onStatus
(PredicateSE<HttpStatusCode> statusPredicate, FunctionSE<ClientResponse, reactor.core.publisher.Mono<? extends ThrowableSE>> exceptionFunction) 特定のエラーステータスコードをエラーシグナルにマップして、レスポンスではなく下流に伝搬する関数を提供します。static ExchangeFilterFunction
ExchangeFilterFunctions.statusError
(PredicateSE<HttpStatusCode> statusPredicate, FunctionSE<ClientResponse, ? extends ThrowableSE> exceptionFunction) 指定されたHttpStatusCode
述語が一致したときにエラーシグナルを生成するフィルターを返します。org.springframework.web.reactive.function.client.support 内の ClientResponse 使用
型 ClientResponse のパラメーターを持つ org.springframework.web.reactive.function.client.support のコンストラクター修飾子コンストラクター説明ClientResponseWrapper
(ClientResponse delegate) 指定されたレスポンスをラップする新しいClientResponseWrapper
を作成します。
WebClient.RequestHeadersSpec.exchangeToMono(Function)
、WebClient.RequestHeadersSpec.exchangeToFlux(Function)
を使用してください ; エラーステータスの処理とともに、ResponseEntity
を介してレスポンスステータスとヘッダーへのアクセスを提供するWebClient.RequestHeadersSpec.retrieve()
の使用も検討してください。