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 construction with HttpConnector and default ClientConfig #67

Closed
jbg opened this issue Mar 4, 2019 · 2 comments · May be fixed by #107
Closed

Allow construction with HttpConnector and default ClientConfig #67

jbg opened this issue Mar 4, 2019 · 2 comments · May be fixed by #107

Comments

@jbg
Copy link
Contributor

jbg commented Mar 4, 2019

See for example the example code at hyper-trust-dns.

If I want to supply an HttpConnector, for example to change the resolver, it seems that I also have to also supply a ClientConfig.

It could be useful to offer a from(http_connector: T) which uses the default rustls ClientConfig.

@g2p
Copy link
Contributor

g2p commented Nov 15, 2021

There's something like that on the main branch now (see #156), you can combine a builder (configuring HTTPS in a consistent and readable way) with a custom connector

let https = hyper_rustls::HttpsConnectorBuilder::new()
    .with_native_roots()
    .https_only()
    .enable_http1()
    .wrap_connector(http)

@cpu
Copy link
Member

cpu commented Apr 4, 2023

Based on @g2p's comment above I'm going to close this ticket as resolved. If the updated API doesn't meet the needs of the original poster we can re-open for further discussion.

Thanks!

@cpu cpu closed this as completed Apr 4, 2023
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 a pull request may close this issue.

3 participants