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

Allow specifying RequestStrategy on per request on next #628

Open
TroyKomodo opened this issue Oct 29, 2024 · 1 comment
Open

Allow specifying RequestStrategy on per request on next #628

TroyKomodo opened this issue Oct 29, 2024 · 1 comment

Comments

@TroyKomodo
Copy link

TroyKomodo commented Oct 29, 2024

Is your feature request related to a problem? Please describe.

image

Currently the config override is specified on a per request basis but there is no way for any client to modify this value.

The difference between doing this and constructing a new client is this will reuse the underlying hyper connection pool. If we invoke the client builder (the only way i found to set the request strategy) we create an entirely new connection pool.

Describe the solution you'd like

Ideally I would like

image

These 2 methods to be exposed on the CustomizedStripeRequest struct aswell so we can do something like this

image

Describe alternatives you've considered

image

Currently we are resorting to this.

Additional context

No response

@mzeitlin11
Copy link
Collaborator

Thanks for trying out the next branch and suggesting improvements @TroyKomodo! The current structure and approach toward allowing custom clients is pretty early stages, so any ideas to improve ergonomics like this one are very welcome. I hope to have more time to work on changes like this soon, but also happy to review any contributions!

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

No branches or pull requests

2 participants