20 releases
| 0.6.0 | Nov 27, 2023 |
|---|---|
| 0.5.0 | Dec 29, 2020 |
| 0.4.3 | Jul 6, 2020 |
| 0.4.1 | Jan 9, 2020 |
| 0.0.0 | Jan 4, 2017 |
#55 in #hyper
17,928,217 downloads per month
Used in fewer than 491 crates
16KB
266 lines
hyper-tls
An HTTPS connector to be used with hyper.
Example
use bytes::Bytes;
use http_body_util::Empty;
use hyper_tls::HttpsConnector;
use hyper_util::{client::legacy::Client, rt::TokioExecutor};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>>{
let https = HttpsConnector::new();
let client = Client::builder(TokioExecutor::new()).build::<_, Empty<Bytes>>(https);
let res = client.get("https://hyper.rs".parse()?).await?;
assert_eq!(res.status(), 200);
Ok(())
}
Crate Features
alpn: Enablesnative-tls/alpn, and ifh2is negotiated, tells hyper.
hyper-tls
Provides an HTTPS connector for use with hyper.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.
Dependencies
~3.5–10MB
~201K SLoC