It would be nice to be able to customize the http.Client and/or http.Transport.
I'm using containers/image to build a tool that allows us to sync images servers behind a bastion host. One of the things we need is the ability to set Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)} in the http.Client. We'd like to do this dynamically, rather than use the HTTP_PROXY env variable, as the source and destination may use different proxy urls. It would also be nice if we could completely configure the http.Client so we could use a tool like https://github.com/seborama/govcr or ttps://github.com/dnaeon/go-vcr for recording & playback of HTTP requests/responses during testing.
It would be nice to be able to customize the
http.Clientand/orhttp.Transport.I'm using
containers/imageto build a tool that allows us to sync images servers behind a bastion host. One of the things we need is the ability to setTransport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)}in thehttp.Client. We'd like to do this dynamically, rather than use theHTTP_PROXYenv variable, as the source and destination may use different proxy urls. It would also be nice if we could completely configure thehttp.Clientso we could use a tool likehttps://github.com/seborama/govcrorttps://github.com/dnaeon/go-vcrfor recording & playback of HTTP requests/responses during testing.