hyper-rustls
hyper-rustls copied to clipboard
Allow construction with HttpConnector and default ClientConfig
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.
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)
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!