class OkHttpClientHttpResponse extends AbstractClientHttpResponse
ClientHttpResponse implementation based on OkHttp 2.x.OkHttp3ClientHttpResponse| Modifier and Type | Field and Description |
|---|---|
private HttpHeaders |
headers |
private Response |
response |
| Constructor and Description |
|---|
OkHttpClientHttpResponse(Response response) |
| 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 Response response
private HttpHeaders headers
public int getRawStatusCode()
ClientHttpResponsepublic java.lang.String getStatusText()
ClientHttpResponsepublic java.io.InputStream getBody()
throws java.io.IOException
HttpInputMessagenull)java.io.IOException - in case of I/O Errorspublic HttpHeaders getHeaders()
HttpMessagenull)public void close()
ClientHttpResponse