Skip to content

Conversation

@sjlee
Copy link

@sjlee sjlee commented Sep 15, 2017

I'd like to offer an important addition to Alice: middleware chaining for http.RoundTrippers. We love Alice and use it for chaining http.Handler middleware. At the same time, working in a router area, we feel the same strong need to be able to chain http.RoundTripper middleware 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!

@justinas
Copy link
Owner

Hi @sjlee,

Thanks for the PR! This is the first time that I have encountered the middleware pattern on RoundTripper. In fact, it is my first time seeing custom RoundTripper utilized at all.

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 bob is 💯 though 😄

@sjlee
Copy link
Author

sjlee commented Sep 27, 2017

Thanks for the response @justinas. The RoundTripper is very much in the HTTP handling picture, on the client side of things.

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?

@han-so1omon
Copy link

Has this been merged and if so how is it used? Roundtripping is recommended here as a way to log http requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants