Class RepeatableBodyResponse
java.lang.Object
co.elastic.clients.transport.http.RepeatableBodyResponse
- All Implemented Interfaces:
TransportHttpClient.Response,Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()The response body, if any.voidclose()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.static TransportHttpClient.Responseof(TransportHttpClient.Response response) The original response of the underlying http library, if available.intThe response status code.
-
Constructor Details
-
RepeatableBodyResponse
- Throws:
IOException
-
-
Method Details
-
of
public static TransportHttpClient.Response of(TransportHttpClient.Response response) throws IOException - Throws:
IOException
-
node
Description copied from interface:TransportHttpClient.ResponseThe 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.- Specified by:
nodein interfaceTransportHttpClient.Response
-
statusCode
public int statusCode()Description copied from interface:TransportHttpClient.ResponseThe response status code.- Specified by:
statusCodein interfaceTransportHttpClient.Response
-
header
Description copied from interface:TransportHttpClient.ResponseGet a header value, or the first value if the header has multiple values.Note: header names are case-insensitive
- Specified by:
headerin interfaceTransportHttpClient.Response
-
headers
Description copied from interface:TransportHttpClient.ResponseGet all values for a given header name.Note: header names are case-insensitive
- Specified by:
headersin interfaceTransportHttpClient.Response
-
body
Description copied from interface:TransportHttpClient.ResponseThe response body, if any.- Specified by:
bodyin interfaceTransportHttpClient.Response- Throws:
IOException
-
originalResponse
Description copied from interface:TransportHttpClient.ResponseThe original response of the underlying http library, if available.- Specified by:
originalResponsein interfaceTransportHttpClient.Response
-
close
Description copied from interface:TransportHttpClient.ResponseClose this response, freeing its associated resources if needed, such as consuming the response body.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceTransportHttpClient.Response- Throws:
IOException
-