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(rpc): expose reqwest client #1421

Merged
merged 3 commits into from
May 29, 2024

Conversation

KaiserKarel
Copy link
Contributor

@KaiserKarel KaiserKarel commented May 18, 2024

Previously, the reqwest client for HttpClient would be unconditionally built by the internal builder, meaning that useful middleware such as tower could not be applied.

This commits adds two ways to create the HttpClient with a custom reqwest::Client, either through new_from_parts, or using the builder.

  • Referenced an issue explaining the need for the change -> this is a trivial code change.
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

@KaiserKarel KaiserKarel force-pushed the expose-reqwest-client branch 2 times, most recently from 67646cb to 10a92cc Compare May 18, 2024 16:35
Previously, the reqwest client for HttpClient would be unconditionally built
by the internal builder, meaning that useful middleware such as tower could
not be applied.

This commits adds two ways to create the HttpClient with a custom reqwest::Client,
either through new_from_parts, or using the builder.
@romac
Copy link
Member

romac commented May 22, 2024

@KaiserKarel Looks great, thanks for the PR! Can you please add a changelog entry for this, mentioning the new Builder::client and HttpClient::new_from_parts methods?

@romac
Copy link
Member

romac commented May 22, 2024

Don't worry about the failure on nightly, I'll take care of it.

@romac romac merged commit 04356a3 into informalsystems:main May 29, 2024
22 checks passed
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.

2 participants