boxo icon indicating copy to clipboard operation
boxo copied to clipboard

pinning/http: Allow caller to supply HTTP client

Open 3456091 opened this issue 3 years ago • 1 comments

I'd like the ability to specify the HTTP client to use. What API do we want? Something like the following?

func (c *Client) WithHTTPClient(hc *http.Client) *Client {
	c.client.GetConfig().HTTPClient = hc
	return c
}

3456091 avatar Mar 31 '22 15:03 3456091

Note to self: when that is added I should add otelhttp's tracing HTTP client so we can send traceparent.

Jorropo avatar Jun 26 '23 13:06 Jorropo