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

Support for custom hyper client #1535

Open
Cubxity opened this issue May 2, 2022 · 1 comment
Open

Support for custom hyper client #1535

Cubxity opened this issue May 2, 2022 · 1 comment

Comments

@Cubxity
Copy link

Cubxity commented May 2, 2022

The Issue

reqwest does not offer enough flexibility, and therefore must be configured for edge cases.

An example is TLS renegotiation in non-controllable environments, such as Xbox Live API (see dart-lang/sdk#47841 for more details).

native-tls seems to work fine for Linux, however MacOS has renegotiation disabled by default on security framework for security reasons. rusttls does not support renegotiation due to security reasons.

The solution

The workaround I have found is to use hyper-openssl with hyper directly. However, this does not provide the user-friendliness that reqwest does. Seeing how reqwest uses hyper under the hood, I believe there should be an option for the user to configure a predefined hyper client.

@seanmonstar
Copy link
Owner

An issue with doing that directly is that reqwest depends on setting some stuff directly, such as the proxy support.

I do hope to eventually have reqwest refactored such that many of its convenience pieces can just be like tower middleware, perhaps stuff living in tower-http. Then it would be easier to grab the different layers and customize your own stack...

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