informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
587 stars 213 forks source link

feat(rpc): expose reqwest client #1421

Closed KaiserKarel closed 4 weeks ago

KaiserKarel commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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