Interface Response

All Superinterfaces:
AutoCloseable

public interface Response extends AutoCloseable
Generic HTTP response from OpenSearch
  • Method Details

    • getBody

      Optional<Body> getBody()
      The optional body of the response. If Optional.empty() then no body was sent with the response.
      Returns:
      optional body of the response
    • getProtocol

      String getProtocol()
      The HTTP protocol version
      Returns:
      HTTP protocol version
    • getMethod

      String getMethod()
      The HTTP method
      Returns:
      HTTP method
    • getReason

      String getReason()
      The status message
      Returns:
      status message
    • getStatus

      int getStatus()
      The status code
      Returns:
      status code
    • getUri

      String getUri()
      Full URI of the request
      Returns:
      full URI of the request
    • getHeaders

      List of headers
      Returns:
      list of headers
    • close

      void close() throws IOException
      Releases all resources associated with this body stream.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException