[][src]Crate hyper_rustls

hyper-rustls

A pure-Rust HTTPS connector for hyper, based on Rustls.

Example

use hyper::{Body, Client, StatusCode, Uri};

let mut rt = tokio::runtime::Runtime::new().unwrap();
let url = ("https://hyper.rs").parse().unwrap();
let https = hyper_rustls::HttpsConnector::new(4);

let client: Client<_, hyper::Body> = Client::builder().build(https);

let res = rt.block_on(client.get(url)).unwrap();
assert_eq!(res.status(), StatusCode::OK);

Structs

HttpsConnector

A Connector for the https scheme.

Enums

MaybeHttpsStream

A stream that might be protected with TLS.