Skip to content

feat(rpc): expose reqwest client#72

Merged
melekes merged 2 commits intomainfrom
KaiserKarel_expose-reqwest-client
May 28, 2025
Merged

feat(rpc): expose reqwest client#72
melekes merged 2 commits intomainfrom
KaiserKarel_expose-reqwest-client

Conversation

@melekes
Copy link
Collaborator

@melekes melekes commented May 28, 2025

@melekes
Copy link
Collaborator Author

melekes commented May 28, 2025

Depends on #71. Merge it first!

@melekes melekes self-assigned this May 28, 2025
@melekes melekes changed the title feat: add a way to provide a custom User-Agent feat(rpc): expose reqwest client May 28, 2025
@greg-szabo
Copy link
Collaborator

I wanted to merge main into the branch, but the buttons don't show up on GitHub. (Maybe some GitHub outage.)

Looks good.

@melekes melekes force-pushed the KaiserKarel_expose-reqwest-client branch from 562cb5e to 8634e3c Compare May 28, 2025 07:36
@melekes melekes requested a review from Copilot May 28, 2025 07:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the ability to provide a custom reqwest client in the RPC HTTP client configuration. Key changes include:

  • Addition of an optional reqwest::Client field and corresponding setter (client()) in the Builder struct.
  • Provision of a new HttpClient constructor (new_from_parts) that accepts a user-supplied reqwest client.
  • Minor improvements in the builder method chain, such as using unwrap_or_else for user_agent.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rpc/src/client/transport/http.rs Adds the reqwest::Client field, a new client() setter, and new_from_parts() constructor.
.changelog/unreleased/features/38-reqwest-client.md Documents the new client() and new_from_parts() methods supporting custom client injection.

@melekes melekes merged commit 04d21c4 into main May 28, 2025
21 of 22 checks passed
@melekes melekes deleted the KaiserKarel_expose-reqwest-client branch May 28, 2025 07:46
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.

Port "feat(rpc): expose reqwest client" (tendermint-rs#1421)

3 participants