pub fn rustls_default<B>() -> Client<RustlsConnector<HttpConnector>, B>Available on (crate features
http1 or http2) and crate feature rustls only.Expand description
With the default hyper_rustls::HttpsConnector.
The config is determined as follows. I think the cert root is similar to the reqwest crate.
- Cert roots
- if the feature
rustls-webpki-rootsis enabled, then useHttpsConnector::with_webpki_roots(); - if
rustls-webpki-rootsis disabled andrustls-native-rootsenabled, thenHttpsConnector::with_native_roots(); - otherwise compilation fails.
The feature rustls is equivalent to rustls-webpki-roots.
- Scheme
HTTPS only
- HTTP version
- if the feature
http1is enabled, then callHttpsConnector::enable_http1(); - if the feature
rustls-http2is enabled, then callHttpsConnector::enable_http2().
This is not exclusive: if both features are enabled, then both methods are called.