Closed dustin-decker closed 1 year ago
There is no way to provide a custom http client or transport right now, short of modifying http.DefaultClient (which is not a good practice).
https://github.com/bitfinexcom/bitfinex-api-go/blob/b4f52b0c0faefbac59865ca54bceb07238d7b474/v2/rest/client.go#L88
The DefaultClient should almost never be used because it lacks timeouts.
I would like to provide my own http client or transport so that I can set timeouts and a custom user agent.
func NewClientWithHttpDo does the job https://github.com/bitfinexcom/bitfinex-api-go/blob/master/docs/rest_v2.md#func--newclientwithhttpdo
func NewClientWithHttpDo
Issue type
Brief description
There is no way to provide a custom http client or transport right now, short of modifying http.DefaultClient (which is not a good practice).
https://github.com/bitfinexcom/bitfinex-api-go/blob/b4f52b0c0faefbac59865ca54bceb07238d7b474/v2/rest/client.go#L88
The DefaultClient should almost never be used because it lacks timeouts.
I would like to provide my own http client or transport so that I can set timeouts and a custom user agent.