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