This repository explores redesigning the API for
the Go language's
net/http
Client
and
Transport
.
Initially, though, it collects problems with the current API. The actual solution has not yet been designed.
See the list of problems.
Or see the overview presentation for the problems in a different format.
This repo does not aim to address the server side of the net/http
package. The server half is in better shape than the client, and it's
also easier to fix the client half without fragmenting the
ecosystem. Changing the Server interface needs to be done much more
carefully.
But even long term, it's almost certainly best for the client and server to live in separate packages. They might share some types & code from shared HTTP package(s).
Brad Fitzpatrick, @bradfitz. I've owned the net/http package for over 8 years and have plenty of gripes about it. I welcome all input. If we're going to finally change it, we should get it right, so there's no need to rush this process.
This repo is temporary and doesn't accept PRs and issues are disabled. It will move at some point to Go's repos with Go's bots and policies.
For now, discuss at https://github.com/golang/go/issues/23707
Roughly:
panic("TODO")
-only implementation)net/http
and golang.org/x/net/http2
code into httpclient
(likely several packages).net/http
and golang.org/x/net/http2
client APIs as wrappers around httpclient
Of course, this is all up for debate.