Interface ProxyHandler

  • All Known Implementing Classes:
    ProxyHandlerImpl

    public interface ProxyHandler
    Creates and validates proxy requests and responses.
    • Method Detail

      • createProxyRequest

        String createProxyRequest​(String hostName,
                                  Map<String,​String> additionalHeaders)
        Creates a CONNECT request to the provided hostName and adds additionalHeaders to the request.
        Parameters:
        hostName - Name of the host to connect to.
        additionalHeaders - Optional. Additional headers to add to the request.
        Returns:
        A string representing the HTTP CONNECT request.
      • validateProxyResponse

        boolean validateProxyResponse​(ProxyResponse httpResponse)
        Verifies that httpResponse contains a successful CONNECT response.
        Parameters:
        httpResponse - HTTP response to validate for a successful CONNECT response.
        Returns:
        true if the HTTP response is successful and correct, and false otherwise.