Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing Bob: middleware chaining for RoundTrippers #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

3 participants