[][src]Crate hyper_tls

hyper-tls

An HTTPS connector to be used with hyper.

Example

extern crate futures;
extern crate hyper;
extern crate hyper_tls;
extern crate tokio;

use futures::{future, Future};
use hyper_tls::HttpsConnector;
use hyper::Client;

fn main() {
    tokio::run(future::lazy(|| {
        // 4 is number of blocking DNS threads
        let https = HttpsConnector::new(4).unwrap();
        let client = Client::builder()
            .build::<_, hyper::Body>(https);

        client
            .get("https://hyper.rs".parse().unwrap())
            .map(|res| {
                assert_eq!(res.status(), 200);
            })
            .map_err(|e| println!("request error: {}", e))
    }));
}

Structs

Error

An error returned from the TLS implementation.

HttpsConnecting

A Future representing work to connect to a URL, and a TLS handshake.

HttpsConnector

A Connector for the https scheme.

TlsStream

A stream protected with TLS.

Enums

MaybeHttpsStream

A stream that might be protected with TLS.