Expand description
§hyper-rustls
A pure-Rust HTTPS connector for hyper, based on Rustls.
§Example client
use http::StatusCode;
use http_body_util::Empty;
use hyper::body::Bytes;
use hyper_util::client::legacy::Client;
use hyper_util::rt::TokioExecutor;
let mut rt = tokio::runtime::Runtime::new().unwrap();
let url = ("https://hyper.rs").parse().unwrap();
let https = hyper_rustls::HttpsConnectorBuilder::new()
    .with_native_roots()
    .expect("no native root CA certificates found")
    .https_only()
    .enable_http1()
    .build();
let client: Client<_, Empty<Bytes>> = Client::builder(TokioExecutor::new()).build(https);
let res = rt.block_on(client.get(url)).unwrap();
assert_eq!(res.status(), StatusCode::OK);Modules§
- builderstates
 - The various states of the 
HttpsConnectorBuilder - config 🔒
 - connector 🔒
 - log 🔒
 - stream 🔒
 
Structs§
- Default
Server Name Resolver  - The default server name resolver, which uses the hostname in the URI.
 - Fixed
Server Name Resolver  - A server name resolver which always returns the same fixed name.
 - Https
Connector  - A Connector for the 
httpsscheme. - Https
Connector Builder  - A builder for an 
HttpsConnector 
Enums§
- Maybe
Https Stream  - A stream that might be protected with TLS.
 
Traits§
- Config
Builder Ext  - Methods for configuring roots
 - Resolve
Server Name  - A trait implemented by types that can resolve a 
ServerNamefor a request.