Description

TLSNextProto specifies how the Transport switches to an alternate protocol (such as HTTP/2) after a TLS NPN/ALPN protocol negotiation. If Transport dials an TLS connection with a non-empty protocol name and TLSNextProto contains a map entry for that key (such as "h2"), then the func is called with the request's authority (such as "example.com" or "example.com:1234") and the TLS connection. The function must return a RoundTripper that then handles the request. If TLSNextProto is nil, HTTP/2 support is enabled automatically.