final class SimpleBufferingClientHttpRequest extends AbstractBufferingClientHttpRequest
ClientHttpRequest implementation that uses standard JDK facilities to
execute buffered requests. Created via the SimpleClientHttpRequestFactory.SimpleClientHttpRequestFactory.createRequest(java.net.URI, HttpMethod)| Modifier and Type | Field and Description |
|---|---|
private java.net.HttpURLConnection |
connection |
private boolean |
outputStreaming |
| Constructor and Description |
|---|
SimpleBufferingClientHttpRequest(java.net.HttpURLConnection connection,
boolean outputStreaming) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static void |
addHeaders(java.net.HttpURLConnection connection,
HttpHeaders headers)
Add the given headers to the given HTTP connection.
|
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, getBodyInternalassertNotExecuted, execute, getBody, getHeadersprivate final java.net.HttpURLConnection connection
private final boolean outputStreaming
SimpleBufferingClientHttpRequest(java.net.HttpURLConnection connection,
boolean outputStreaming)
public HttpMethod getMethod()
HttpRequestnull
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequestnull)protected ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingClientHttpRequestexecuteInternal in class AbstractBufferingClientHttpRequestheaders - the HTTP headersbufferedOutput - the body contentjava.io.IOExceptionstatic void addHeaders(java.net.HttpURLConnection connection,
HttpHeaders headers)
connection - the connection to add the headers toheaders - the headers to add