#hyper #tls #http #https #ssl

hyper-tls

Default TLS implementation for use with hyper

11 releases

0.3.2 Mar 19, 2019
0.3.1 Oct 2, 2018
0.3.0 Jun 26, 2018
0.2.1 Jun 11, 2018
0.0.0 Jan 4, 2017

#4 in HTTP server

Download history 20831/week @ 2019-01-20 21084/week @ 2019-01-27 20059/week @ 2019-02-03 22113/week @ 2019-02-10 20288/week @ 2019-02-17 23755/week @ 2019-02-24 24945/week @ 2019-03-03 25990/week @ 2019-03-10 29837/week @ 2019-03-17 26196/week @ 2019-03-24 29221/week @ 2019-03-31 34312/week @ 2019-04-07 32072/week @ 2019-04-14 39489/week @ 2019-04-21 33951/week @ 2019-04-28

136,965 downloads per month
Used in 615 crates (146 directly)

MIT/Apache

14KB
286 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
~79K SLoC