インターフェースの使用
org.springframework.web.reactive.function.client.ExchangeFilterFunction
パッケージ
説明
WebTestClient
を介した Spring WebFlux サーバーエンドポイントのテストのサポート。org.springframework.http.client.reactive
リアクティブ HTTP アダプター層上に構築されるリアクティブ WebClient
を提供します。org.springframework.test.web.reactive.server 内の ExchangeFilterFunction 使用
修飾子と型メソッド説明WebTestClient.Builder.filter
(ExchangeFilterFunction filter) 指定されたフィルターをフィルターチェーンに追加します。修飾子と型メソッド説明WebTestClient.Builder.filters
(ConsumerSE<ListSE<ExchangeFilterFunction>> filtersConsumer) 指定されたコンシューマーでフィルターを操作します。org.springframework.web.reactive.function.client 内の ExchangeFilterFunction 使用
修飾子と型メソッド説明default ExchangeFilterFunction
ExchangeFilterFunction.andThen
(ExchangeFilterFunction afterFilter) 最初にこのフィルターを適用し、次に指定されたafterFilter
を適用する、合成されたフィルター関数を返します。static ExchangeFilterFunction
ExchangeFilterFunctions.basicAuthentication()
使用すべきではありません。static ExchangeFilterFunction
ExchangeFilterFunctions.basicAuthentication
(StringSE username, StringSE password) HttpHeaders.setBasicAuth(String)
およびHttpHeaders.encodeBasicAuth(String, String, Charset)
を介してリクエストヘッダーに HTTP 基本認証を適用するフィルターを返します。static ExchangeFilterFunction
ExchangeFilterFunctions.limitResponseSize
(long maxByteCount) レスポンス本文から指定されたバイト数まで消費し、さらにデータが到着した場合はキャンセルします。static ExchangeFilterFunction
ExchangeFilterFunction.ofRequestProcessor
(FunctionSE<ClientRequest, reactor.core.publisher.Mono<ClientRequest>> processor) ClientRequest
でのみ動作するフィルター関数に、指定されたリクエストプロセッサー関数を適合させます。static ExchangeFilterFunction
ExchangeFilterFunction.ofResponseProcessor
(FunctionSE<ClientResponse, reactor.core.publisher.Mono<ClientResponse>> processor) ClientResponse
でのみ動作するフィルター関数に、指定されたレスポンスプロセッサー関数を適合させます。static ExchangeFilterFunction
ExchangeFilterFunctions.statusError
(PredicateSE<HttpStatusCode> statusPredicate, FunctionSE<ClientResponse, ? extends ThrowableSE> exceptionFunction) 指定されたHttpStatusCode
述語が一致したときにエラーシグナルを生成するフィルターを返します。修飾子と型メソッド説明default ExchangeFilterFunction
ExchangeFilterFunction.andThen
(ExchangeFilterFunction afterFilter) 最初にこのフィルターを適用し、次に指定されたafterFilter
を適用する、合成されたフィルター関数を返します。default ExchangeFunction
ExchangeFunction.filter
(ExchangeFilterFunction filter) 指定されたExchangeFilterFunction
で交換関数をフィルター処理すると、フィルター処理されたExchangeFunction
が生成されます。WebClient.Builder.filter
(ExchangeFilterFunction filter) 指定されたフィルターをフィルターチェーンの最後に追加します。修飾子と型メソッド説明WebClient.Builder.filters
(ConsumerSE<ListSE<ExchangeFilterFunction>> filtersConsumer) 指定されたコンシューマーでフィルターを操作します。
HttpHeaders.setBasicAuth(String, String)
を使用することを推奨。