This is supported on crate feature hyper-tls-connector only.
Expand description

Provides a helper method to create an https connector using hyper-tls

Example

use hyper::Client;
use hyper_trust_dns_connector::https::new_async_https_connector;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let https_connector = new_async_https_connector()?;
    let client: Client<_> = Client::builder().build(https_connector);
    let res = client
        .get(hyper::Uri::from_static("https://httpbin.org/ip"))
        .await?;
    assert_eq!(res.status(), 200);
    Ok(())
}

Enums

Functions

A helper function to create an https connector from hyper-tls and a dns task with the default configuration.