Thats what I think too. Thanks for the confirmation, I'll raise a pull
request with the aforementioned third-party package.
Thanks everyone.
On Monday, December 12, 2016 at 10:25:10 AM UTC, Dave Cheney wrote:
>
> I don't think it's up to the std lib to define such an interface; that
> should be
I don't think it's up to the std lib to define such an interface; that
should be the responsibility of the third party package -- it should define
an interface with the behaviour it requires
On Monday, 12 December 2016 20:55:26 UTC+11, omarsharif...@gmail.com wrote:
>
> Yeah, I thought as much.
Yeah, I thought as much.
I will raise a pull request with the third-party package and implement the
requirement of a http.Client as an interface that matches the http.Client
methods used by the package.
Should the standard library http.Client provide an interface for
http.Client so that third-
> How would I swap out a http.Client that is required by a third-party
library with a another that supports, say retries with exponential back-off?
I'd suggest looking at http.Transport and http.RoundTripper [
https://golang.org/pkg/net/http/#RoundTripper]. The docs explicitly forbid
using RoundTr
Just a quick question - I've noticed that the http package doesn't have an
interface for Client. How would I swap out a http.Client that is required
by a third-party library with a another that supports, say retries with
exponential back-off? It appears that it is not possible? Would the http
p