class InterceptingClientHttpRequest extends AbstractBufferingClientHttpRequest
ClientHttpRequest
that has support for ClientHttpRequestInterceptor
s.Modifier and Type | Class and Description |
---|---|
private class |
InterceptingClientHttpRequest.InterceptingRequestExecution |
Modifier and Type | Field and Description |
---|---|
private java.util.List<ClientHttpRequestInterceptor> |
interceptors |
private HttpMethod |
method |
private ClientHttpRequestFactory |
requestFactory |
private java.net.URI |
uri |
Modifier | Constructor and Description |
---|---|
protected |
InterceptingClientHttpRequest(ClientHttpRequestFactory requestFactory,
java.util.List<ClientHttpRequestInterceptor> interceptors,
java.net.URI uri,
HttpMethod method) |
Modifier and Type | Method and Description |
---|---|
protected ClientHttpResponse |
executeInternal(HttpHeaders headers,
byte[] bufferedOutput)
Abstract template method that writes the given headers and content to the HTTP request.
|
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
java.net.URI |
getURI()
Return the URI of the request.
|
executeInternal, getBodyInternal
assertNotExecuted, execute, getBody, getHeaders
private final ClientHttpRequestFactory requestFactory
private final java.util.List<ClientHttpRequestInterceptor> interceptors
private HttpMethod method
private java.net.URI uri
protected InterceptingClientHttpRequest(ClientHttpRequestFactory requestFactory, java.util.List<ClientHttpRequestInterceptor> interceptors, java.net.URI uri, HttpMethod method)
public HttpMethod getMethod()
HttpRequest
null
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequest
null
)protected final ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingClientHttpRequest
executeInternal
in class AbstractBufferingClientHttpRequest
headers
- the HTTP headersbufferedOutput
- the body contentjava.io.IOException