public class InterceptingClientHttpRequestFactory extends AbstractClientHttpRequestFactoryWrapper
ClientHttpRequestFactory
wrapper with support for ClientHttpRequestInterceptor
s.ClientHttpRequestFactory
,
ClientHttpRequestInterceptor
Constructor and Description |
---|
InterceptingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory,
java.util.List<ClientHttpRequestInterceptor> interceptors)
Create a new instance of the
InterceptingClientHttpRequestFactory with the given parameters. |
Modifier and Type | Method and Description |
---|---|
protected ClientHttpRequest |
createRequest(java.net.URI uri,
HttpMethod httpMethod,
ClientHttpRequestFactory requestFactory)
Create a new
ClientHttpRequest for the specified URI and HTTP method
by using the passed-on request factory. |
createRequest
public InterceptingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory, @Nullable java.util.List<ClientHttpRequestInterceptor> interceptors)
InterceptingClientHttpRequestFactory
with the given parameters.requestFactory
- the request factory to wrapinterceptors
- the interceptors that are to be applied (can be null
)protected ClientHttpRequest createRequest(java.net.URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
AbstractClientHttpRequestFactoryWrapper
ClientHttpRequest
for the specified URI and HTTP method
by using the passed-on request factory.
Called from AbstractClientHttpRequestFactoryWrapper.createRequest(URI, HttpMethod)
.
createRequest
in class AbstractClientHttpRequestFactoryWrapper
uri
- the URI to create a request forhttpMethod
- the HTTP method to executerequestFactory
- the wrapped request factory