Very Nice stuff - shame he didn't merge it.
But I see that you changes the request in the RoundTrip function, which is
claimed as forbidden in the docs.
Again, I don't understand why the docs forbid it...
On Wednesday, March 7, 2018 at 1:52:55 AM UTC+2, Sangjin Lee wrote:
>
> I offered a PR on a
I offered a PR on alice (which is a middleware library for the handlers)
that does that. It's essentially an application of the same pattern. We're
getting a lot of mileage for this.
https://github.com/justinas/alice/pull/40
On Tuesday, March 6, 2018 at 6:41:53 AM UTC-8, Eyal Posener wrote:
>
>
Good stuff,
So I see that this library wraps the http.Client and doesn't use the
roundtripper.
Pretty elegant!
I still have two questions about the standard library:
- Didn't understand yet why it is not allowed to add headers in the
roundtripper.
- Is this a bit strange that the stand
As far as I am aware, there is very little information about best practices
regarding client side middlewares.
I though that having such support is neat idea and I have implemented
something (that I use for some time now, though still in beta) that you
might find useful for your use case. I ha