networkProtocolName
The network protocol used to fetch the resource.
Declaration
var networkProtocolName: String? { get }Discussion
When a proxy is configured and a tunnel connection is established, this attribute returns the value for the tunneled protocol, which is identified by the ALPN Protocol ID Identification Sequence, as per RFC 7310. For example:
If no proxy is used, and HTTP/2 is negotiated, then
h2is returned.If HTTP/1.1 is used with the proxy, and the tunneled connection is HTTP/2, then
h2is returned.If HTTP/1.1 is used with the proxy, and there’s no tunnel, then
http/1.1is returned.