Interface Response

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface Response
    extends java.lang.AutoCloseable
    Generic HTTP response from OpenSearch
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Releases all resources associated with this body stream.
      java.util.Optional<Body> getBody()
      The optional body of the response.
      java.util.Collection<java.util.Map.Entry<java.lang.String,​java.lang.String>> getHeaders()
      List of headers
      java.lang.String getMethod()
      The HTTP method
      java.lang.String getProtocol()
      The HTTP protocol version
      java.lang.String getReason()
      The status message
      int getStatus()
      The status code
      java.lang.String getUri()
      Full URI of the request
    • Method Detail

      • getBody

        java.util.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

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

        java.lang.String getMethod()
        The HTTP method
        Returns:
        HTTP method
      • getReason

        java.lang.String getReason()
        The status message
        Returns:
        status message
      • getStatus

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

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

        java.util.Collection<java.util.Map.Entry<java.lang.String,​java.lang.String>> getHeaders()
        List of headers
        Returns:
        list of headers
      • close

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