Class Response
java.lang.Object
org.opensearch.client.Response
Holds an opensearch response. It wraps the
HttpResponse returned and associates it with
its corresponding RequestLine and HttpHost.-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.http.HttpEntityReturns the response body available, null otherwiseReturns the value of the first header with a specified name of this message.org.apache.hc.core5.http.Header[]Returns all the response headersorg.apache.hc.core5.http.HttpHostgetHost()Returns the node that returned this responseorg.apache.hc.core5.http.message.RequestLineReturns the request line that generated this responseorg.apache.hc.core5.http.message.StatusLineReturns the status line of the current responseReturns a list of all warning headers returned in the response.booleanReturns true if there is at least one warning header returned in the response.toString()Convert response to string representation
-
Method Details
-
getRequestLine
public org.apache.hc.core5.http.message.RequestLine getRequestLine()Returns the request line that generated this response -
getHost
public org.apache.hc.core5.http.HttpHost getHost()Returns the node that returned this response -
getStatusLine
public org.apache.hc.core5.http.message.StatusLine getStatusLine()Returns the status line of the current response -
getHeaders
public org.apache.hc.core5.http.Header[] getHeaders()Returns all the response headers -
getHeader
-
getEntity
public org.apache.hc.core5.http.HttpEntity getEntity()Returns the response body available, null otherwise- See Also:
-
getWarnings
-
hasWarnings
public boolean hasWarnings()Returns true if there is at least one warning header returned in the response. -
toString
-