trusted

fun trusted(userAgent: String, policy: OutboundUrlPolicy.Trusted = OutboundUrlPolicy.trusted(), resolve: (host: String) -> List<InetAddress> = { InetAddress.getAllByName(it).toList() }): OkHttpTransport(source)

The real transport under a Trusted policy with cleartext forced on (loopback servers speak http) and every other property of policy kept; no relaxation (Trusted has no loopback rule to relax).

Return

the transport; the caller closes it.

Parameters

userAgent

the User-Agent sent on every hop, as the public factory takes it.

policy

the policy; the defaults when omitted.

resolve

answers a host name with addresses; the system resolver by default. Its exceptions reach the transport unchanged.

Throws

for a userAgent the public factory refuses, or a policy.settings.maxResponseBytes above Int.MAX_VALUE - 8; the message is constant and never echoes a value.