Expand description
§hyper-tls
An HTTPS connector to be used with hyper.
§Example
use bytes::Bytes; use http_body_util::Empty; use hyper_tls::HttpsConnector; use hyper_util::{client::legacy::Client, rt::TokioExecutor}; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<(), Box<dyn std::error::Error>>{ let https = HttpsConnector::new(); let client = Client::builder(TokioExecutor::new()).build::<_, Empty<Bytes>>(https); let res = client.get("https://hyper.rs".parse()?).await?; assert_eq!(res.status(), 200); Ok(()) }§Crate Features
alpn: Enablesnative-tls/alpn, and ifh2is negotiated, tells hyper.
Structs§
- Https
Connecting - A Future representing work to connect to a URL, and a TLS handshake.
- Https
Connector - A Connector for the
httpsscheme. - TlsStream
- A wrapper around an underlying raw stream which implements the TLS or SSL protocol.
Enums§
- Maybe
Https Stream - A stream that might be protected with TLS.