Introducing Bob: middleware chaining for RoundTrippers#40
Conversation
|
Hi @sjlee, Thanks for the PR! This is the first time that I have encountered the middleware pattern on However, I am trying to keep Alice as lean as possible and this would probably be best suited for a separate project. Let me know what you think about that. The name |
|
Thanks for the response @justinas. The All things being equal, I would love this to be part of alice rather than a separate repo. I could of course create a new repo for this, but I wanted to give this to alice as this is heavily inspired by alice and it's a symmetric feature. Any chance I could convince you to change your mind on this? |
|
Has this been merged and if so how is it used? Roundtripping is recommended here as a way to log http requests |
I'd like to offer an important addition to Alice: middleware chaining for
http.RoundTrippers. We love Alice and use it for chaininghttp.Handlermiddleware. At the same time, working in a router area, we feel the same strong need to be able to chainhttp.RoundTrippermiddleware pieces (client-side) declaratively.Fortunately, the mechanism of Alice can be easily extended to support
http.RoundTripper. We thought that we would offer the PR to Alice instead of keeping it on our end. Let me know what you guys think. Thanks!