#hyper #tls #http #https #ssl

hyper-tls

Default TLS implementation for use with hyper

9 unstable releases (3 breaking)

0.3.0 Jun 26, 2018
0.2.1 Jun 11, 2018
0.1.4 Jul 31, 2018
0.1.3 Mar 18, 2018
0.0.0 Jan 4, 2017

#2 in HTTP client

Download history 12118/week @ 2018-09-17 15926/week @ 2018-09-24 15283/week @ 2018-10-01 18561/week @ 2018-10-08 17793/week @ 2018-10-15 17149/week @ 2018-10-22 20030/week @ 2018-10-29 19396/week @ 2018-11-05 19904/week @ 2018-11-12 20474/week @ 2018-11-19 17349/week @ 2018-11-26 19797/week @ 2018-12-03 17500/week @ 2018-12-10

49,313 downloads per month
Used in 598 crates (122 directly)

MIT/Apache

13KB
280 lines

hyper-tls

Provides an HTTPS connector for use with hyper.

Documentation

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

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))
    }));
}

Dependencies

~4MB
~76K SLoC