Deprecate Transport, Server, and related HTTP/2 APIs
The Transport and Server types in golang.org/x/net/http2 will be deprecated. Every feature they support is now available through public APIs in net/http, so users no longer need them.
The following are deprecated:
TransportandServer, including their fields and methods.ConfigureServer,ConfigureTransport, andConfigureTransports. Usenet/httpsettings instead.ClientConnandClientConnState. Usenet/http.ClientConninstead.
To get an HTTP/2-only client or server, configure the net/http Transport or Server directly:
tr := &http.Transport{}
tr.Protocols = new(http.Protocols)
tr.Protocols.SetHTTP2(true)
tr.HTTP2 = &http.HTTP2Config{MaxConcurrentStreams: 100}
client := &http.Client{Transport: tr}
- Proposal
- #78064 by neild
- Status
- Implemented on Aug 27, 2026
- Impact
- medium
- Area
- x/net/http2