#hyper #tls #http #https #ssl

hyper-tls

Default TLS implementation for use with hyper

10 unstable releases (3 breaking)

0.3.1 Oct 2, 2018
0.3.0 Jun 26, 2018
0.2.1 Jun 11, 2018
0.1.4 Jul 31, 2018
0.0.0 Jan 4, 2017

#1 in HTTP client

Download history 18030/week @ 2018-10-14 19200/week @ 2018-10-21 19702/week @ 2018-10-28 19114/week @ 2018-11-04 20908/week @ 2018-11-11 17865/week @ 2018-11-18 19330/week @ 2018-11-25 20069/week @ 2018-12-02 22240/week @ 2018-12-09 18926/week @ 2018-12-16 13407/week @ 2018-12-23 16557/week @ 2018-12-30 20008/week @ 2019-01-06 21494/week @ 2019-01-13 20831/week @ 2019-01-20

79,888 downloads per month
Used in 586 crates (128 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