ExchangeFilterFunction
を推奨 @DeprecatedSE public interface AsyncClientHttpRequestInterceptor
HttpRequest
を変更するために AsyncRestTemplate
に登録するか、ListenableFutureAdapter
を使用して受信 ClientHttpResponse
を変更するために登録することができます。 インターセプターのメインエントリポイントは intercept(org.springframework.http.HttpRequest, byte[], org.springframework.http.client.AsyncClientHttpRequestExecution)
です。
AsyncRestTemplate
, InterceptingAsyncHttpAccessor
修飾子と型 | メソッドと説明 |
---|---|
ListenableFuture<ClientHttpResponse> | intercept(HttpRequest request, byte[] body, AsyncClientHttpRequestExecution execution) 使用すべきではありません。 指定されたリクエストをインターセプトし、将来のレスポンスを返します。 |
ListenableFuture<ClientHttpResponse> intercept(HttpRequest request, byte[] body, AsyncClientHttpRequestExecution execution) throws IOExceptionSE
AsyncClientHttpRequestExecution
により、インターセプターはチェーンの次のエンティティにリクエストを渡すことができます。実装はこのパターンに従うかもしれません:
ClientHttpRequestExecution
を介してリクエストを実行する ListenableFutureAdapter
の助けを借りて HTTP 属性をフィルタリングするようにレスポンスを調整します。request
- メソッド、URI、ヘッダーを含むリクエスト body
- リクエストの本文 execution
- リクエストの実行 IOExceptionSE
- I/O エラーの場合