| org.springframework.http.client.ClientHttpRequestInterceptor |
Intercepts client-side HTTP requests. Implementations of this interface can be registered with the
RestTemplate, as to modify the outgoing ClientHttpRequest
and/or the incoming ClientHttpResponse.
The main entry point for interceptors is intercept(HttpRequest, byte[], ClientHttpRequestExecution).
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Intercept the given request, and return a response.
| |||||||||||
Intercept the given request, and return a response. The given ClientHttpRequestExecution allows
the interceptor to pass on the request and response to the next entity in the chain.
A typical implementation of this method would follow the following pattern:
request and bodywrap the request to filter HTTP attributes.execute(org.springframework.http.HttpRequest, byte[]),| request | the request, containing method, URI, and headers |
|---|---|
| body | the body of the request |
| execution | the request execution |
| IOException | in case of I/O errors |
|---|