final class SimpleClientHttpResponse extends AbstractClientHttpResponse
ClientHttpResponse implementation that uses standard JDK facilities.
Obtained via AbstractClientHttpRequest.execute() and
AbstractClientHttpRequest.execute().| Modifier and Type | Field and Description |
|---|---|
private java.net.HttpURLConnection |
connection |
private HttpHeaders |
headers |
private java.io.InputStream |
responseStream |
| Constructor and Description |
|---|
SimpleClientHttpResponse(java.net.HttpURLConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this response, freeing any resources created.
|
java.io.InputStream |
getBody()
Return the body of the message as an input stream.
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
int |
getRawStatusCode()
Return the HTTP status code of the response as integer
|
java.lang.String |
getStatusText()
Return the HTTP status text of the response.
|
getStatusCodeprivate final java.net.HttpURLConnection connection
private HttpHeaders headers
private java.io.InputStream responseStream
SimpleClientHttpResponse(java.net.HttpURLConnection connection)
public int getRawStatusCode()
throws java.io.IOException
ClientHttpResponsejava.io.IOException - in case of I/O errorspublic java.lang.String getStatusText()
throws java.io.IOException
ClientHttpResponsejava.io.IOException - in case of I/O errorspublic HttpHeaders getHeaders()
HttpMessagenull)public java.io.InputStream getBody()
throws java.io.IOException
HttpInputMessagenull)java.io.IOException - in case of I/O Errorspublic void close()
ClientHttpResponse