public interface ClientHttpResponse extends HttpInputMessage, Closeable
ClientHttpRequest.execute()
.
A ClientHttpResponse
must be closed, typically in a
finally
block.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this response, freeing any resources created.
|
int |
getRawStatusCode()
Return the HTTP status code of the response as integer
|
HttpStatus |
getStatusCode()
Return the HTTP status code of the response.
|
String |
getStatusText()
Return the HTTP status text of the response.
|
getBody
getHeaders
HttpStatus getStatusCode() throws IOException
IOException
- in case of I/O errorsint getRawStatusCode() throws IOException
IOException
- in case of I/O errorsString getStatusText() throws IOException
IOException
- in case of I/O errorsvoid close()
close
in interface AutoCloseable
close
in interface Closeable