Interface TransportHttpClient.Response
- All Superinterfaces:
AutoCloseable
,Closeable
- Enclosing interface:
- TransportHttpClient
An http response.
-
Method Summary
Modifier and TypeMethodDescriptionbody()
The response body, if any.void
close()
Close this response, freeing its associated resources if needed, such as consuming the response body.Get a header value, or the first value if the header has multiple values.Get all values for a given header name.node()
The host/node that was used to send the request.The original response of the underlying http library, if available.int
The response status code.
-
Method Details
-
node
TransportHttpClient.Node node()The host/node that was used to send the request. It may be different from the one that was provided with the request if the http client has a multi-node retry strategy. -
statusCode
int statusCode()The response status code. -
header
Get a header value, or the first value if the header has multiple values.Note: header names are case-insensitive
-
headers
Get all values for a given header name.Note: header names are case-insensitive
-
body
The response body, if any.- Throws:
IOException
-
originalResponse
The original response of the underlying http library, if available. -
close
Close this response, freeing its associated resources if needed, such as consuming the response body.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-