1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # hyper-tls
//!
//! An HTTPS connector to be used with [hyper][].
//!
//! [hyper]: https://hyper.rs
//!
//! ## Example
//!
//! ```no_run
//! 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))
//!     }));
//! }
//! ```
#![doc(html_root_url = "https://docs.rs/hyper-tls/0.3.2")]
#![cfg_attr(test, deny(warnings))]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]

extern crate bytes;
extern crate futures;
extern crate hyper;
extern crate native_tls;
#[macro_use]
extern crate tokio_io;

pub use client::{HttpsConnector, HttpsConnecting, Error};
pub use stream::{MaybeHttpsStream, TlsStream};

mod client;
mod stream;