Interface ProxyResponse

  • All Known Implementing Classes:
    ProxyResponseImpl

    public interface ProxyResponse
    Represents an HTTP response from a proxy.
    • Method Detail

      • getHeaders

        Map<String,​List<String>> getHeaders()
        Gets the headers for the HTTP response.
        Returns:
        The headers for the HTTP response.
      • getStatus

        HttpStatusLine getStatus()
        Gets the HTTP status line.
        Returns:
        The HTTP status line.
      • getContents

        ByteBuffer getContents()
        Gets the HTTP response body.
        Returns:
        The HTTP response body.
      • getError

        String getError()
        Gets the HTTP response body as an error.
        Returns:
        If there is no HTTP response body, an empty string is returned.
      • isMissingContent

        boolean isMissingContent()
        Gets whether or not the HTTP response is complete. An HTTP response is complete when the HTTP header and body are received.
        Returns:
        true if the HTTP response is complete, and false otherwise.
      • addContent

        void addContent​(ByteBuffer contents)
        Adds contents to the body if it is missing content.
        Parameters:
        contents - Contents to add to the HTTP body.
      • hasConnectionCloseHeader

        boolean hasConnectionCloseHeader()
        Checks if the HTTP response for CONNECT has a "Connection: close" header.
        Returns:
        true if the HTTP response has a "Connection: close" header, and false otherwise.