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

feat: storage - change reqwest::Client for reqwest_middleware::Client #228

Merged
merged 3 commits into from
Feb 9, 2024
Merged

feat: storage - change reqwest::Client for reqwest_middleware::Client #228

merged 3 commits into from
Feb 9, 2024

Conversation

nicolas-vivot
Copy link
Contributor

@nicolas-vivot nicolas-vivot commented Feb 8, 2024

description

This PR replace the use of reqwest::Client by reqwest_middleware::Client.

motivation behind this change

We (in my company) need to perform automatic retry around our GCS requests.
This could be done by adding a wrapper around our use of google-cloud-rust, that would solve the immediate need. But there might be additional need in the near future to enrich requests being made.

benefits

  • address the need at the core
  • ability to customize both the retry policy and strategy using reqwest-retry and retry-policies with the use of a reqwest-middleware client.
  • ability to add custom middlewares to perform in-house logic.
  • ability for this library to refactor internal logic and use middleware layers for the authorization header, and any other custom headers.

Feel free to add any constructive comments.

@nicolas-vivot nicolas-vivot marked this pull request as ready for review February 8, 2024 06:54
@nicolas-vivot nicolas-vivot changed the title Switch from reqwest::Client to reqwest_middleware::Client feat: storage - change reqwest::Client for reqwest_middleware::Client Feb 8, 2024
@yoshidan yoshidan added the safe to test safe to test label Feb 9, 2024
@yoshidan yoshidan merged commit 78bd1f6 into yoshidan:main Feb 9, 2024
6 checks passed
@yoshidan
Copy link
Owner

yoshidan commented Feb 9, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test safe to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants