#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

#1 in HTTP client

Download history 9867/week @ 2018-07-28 12359/week @ 2018-08-04 12402/week @ 2018-08-11 11408/week @ 2018-08-18 12129/week @ 2018-08-25 13845/week @ 2018-09-01 14490/week @ 2018-09-08 14626/week @ 2018-09-15 15572/week @ 2018-09-22 14925/week @ 2018-09-29 18522/week @ 2018-10-06 17199/week @ 2018-10-13 18028/week @ 2018-10-20

49,313 downloads per month
Used in 700 crates (113 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
~74K SLoC