okhttp / okhttp3 / Route

Route

data class Route

The concrete route used by a connection to reach an abstract origin server. When creating a connection the client has many options:

Each route is a specific selection of these options.

Constructors

<init>

Route(address: Address, proxy: Proxy, inetSocketAddress: InetSocketAddress)

The concrete route used by a connection to reach an abstract origin server. When creating a connection the client has many options:

Functions

address

fun address(): Address

proxy

fun proxy(): Proxy

Returns the Proxy of this route.

requiresTunnel

fun requiresTunnel(): Boolean

Returns true if this route tunnels HTTPS through an HTTP proxy. See RFC 2817, Section 5.2.

socketAddress

fun socketAddress(): InetSocketAddress

toString

fun toString(): String