Skip to content

Commit 1f9f8a1

Browse files
authored
Merge pull request #22 from hjr3/hyper-tls
Update to hyper-tls 0.5
2 parents f2ba820 + b5d00fd commit 1f9f8a1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ tokio-io-timeout = "1.1.0"
1818

1919
[dev-dependencies]
2020
hyper = { version = "0.14", features = ["client", "http1", "tcp"] }
21-
#FIXME enable when https://github.com/hyperium/hyper-tls/pull/79 lands
22-
#hyper-tls = "0.4"
21+
hyper-tls = "0.5"
2322
tokio = { version = "1.0.0", features = ["io-std", "io-util", "macros"] }

examples/client.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use std::time::Duration;
44
use hyper::{body::HttpBody as _, Client};
55
use tokio::io::{self, AsyncWriteExt as _};
66

7-
use hyper::client::HttpConnector;
8-
//use hyper_tls::HttpsConnector;
7+
use hyper_tls::HttpsConnector;
98

109
use hyper_timeout::TimeoutConnector;
1110

@@ -23,8 +22,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2322
let url = url.parse::<hyper::Uri>().unwrap();
2423

2524
// This example uses `HttpsConnector`, but you can also use hyper `HttpConnector`
26-
let h = HttpConnector::new();
27-
//let h = HttpsConnector::new();
25+
//let h = hyper::client::HttpConnector::new();
26+
let h = HttpsConnector::new();
2827
let mut connector = TimeoutConnector::new(h);
2928
connector.set_connect_timeout(Some(Duration::from_secs(5)));
3029
connector.set_read_timeout(Some(Duration::from_secs(5)));

0 commit comments

Comments
 (0)