Class TunnelRequest

java.lang.Object
com.squareup.okhttp.TunnelRequest

public final class TunnelRequest
extends Object
Routing and authentication information sent to an HTTP proxy to create a HTTPS to an origin server. Everything in the tunnel request is sent unencrypted to the proxy server.

See RFC 2817, Section 5.2.

  • Constructor Details

    • TunnelRequest

      public TunnelRequest​(String host, int port, String userAgent, String proxyAuthorization)
      Parameters:
      host - the origin server's hostname. Not null.
      port - the origin server's port, like 80 or 443.
      userAgent - the client's user-agent. Not null.
      proxyAuthorization - proxy authorization, or null if the proxy is used without an authorization header.