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.
|
java.lang.String |
getMethodValue()
Return the HTTP method of the request as a String value.
|
java.net.URI |
getURI()
Return the URI of the request (including a query string if any,
but only if it is well-formed for a URI representation).
|
executeInternal, getBodyInternal
assertNotExecuted, execute, getBody, getHeaders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMethod
private final java.net.HttpURLConnection connection
private final boolean outputStreaming
SimpleBufferingClientHttpRequest(java.net.HttpURLConnection connection, boolean outputStreaming)
public java.lang.String getMethodValue()
HttpRequest
HttpRequest.getMethod()
public java.net.URI getURI()
HttpRequest
null
)protected ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingClientHttpRequest
executeInternal
in class AbstractBufferingClientHttpRequest
headers
- the HTTP headersbufferedOutput
- the body contentjava.io.IOException
static void addHeaders(java.net.HttpURLConnection connection, HttpHeaders headers)
connection
- the connection to add the headers toheaders
- the headers to add