Interface PortableHttpResponse


  • public interface PortableHttpResponse
    This interface exposes the commonalities between the Apache httpasyncclient and Netty and R2 client.
    • Method Detail

      • getStatusCode

        int getStatusCode()
        Returns:
        Status code of the response, like 200, 400, 500 etc.
      • getContentInByteBuf

        io.netty.buffer.ByteBuf getContentInByteBuf()
                                             throws java.io.IOException
        Returns the response as ByteBuf.
        Returns:
        Throws:
        java.io.IOException
      • containsHeader

        boolean containsHeader​(java.lang.String headerName)
        Parameters:
        headerName -
        Returns:
        whether response contains header name specified in the parameters
      • getFirstHeader

        java.lang.String getFirstHeader​(java.lang.String headerName)
        Parameters:
        headerName -
        Returns:
        the value of the first header for header name specified in the parameters