beldur/kraken-go-api-client

How to override http.Client{} with custom one?

Glavic opened this issue · 3 comments

If API consumer needs to change timeouts, proxy, or what ever else on http.Client{} he cannot do this atm.

I would suggest to make KrakenApi struct public and that would probably solve all problems?
For example: https://github.com/Glavic/kraken-go-api-client/commit/b60b3819bce6afb919764e87c90eccb06aecff43

Any other ideas?

What about a new Method krakenapi.NewWithClient(key, secret, yourOwnHTTPClient). Would that help?

Yes, that would also solve the problem.

@beldur @Glavic
Just submitted a PR to solve this issue. Is this solution works for you guys?