Skip to content

Customize http.Client and/or http.Transport #1194

@AnalogJ

Description

@AnalogJ

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureA request for, or a PR adding, new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions