-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add optional reqwest-middleware feature #1074
Conversation
Add a new `middleware` feature that allows users to opt into using `reqwest_middleware::Client` instead of `reqwest::Client`. This enables users to enable automatic retries or tracing in their application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff on this PR is unfortunately quite large due to duplication of each test output file with the middleware
FF enabled.
This will be consumed by oxidecomputer/oxide.rs#1035 |
Do we want to update CI to run tests and/or builds with this feature enabled? |
Can you give me context on why we're doing this and where we intend to use it? Does this make sense as a cargo feature? Recall that features apply across the compilation so eg using this feature for one client crate would break the use of an unrelated client crate that did not intend to use the feature. |
This enables us to generate logs for API calls in
I think it's the least worst option:
|
A couple of options that seem potentially palatable
I don't see option 3 as viable. |
A settings option is much cleaner, thanks! I've opened #1079, will close this out. |
Add a new
middleware
feature that allows users to opt into usingreqwest_middleware::Client
instead ofreqwest::Client
. This enables users to enable automatic retries or tracing in their application.