Skip to content

Commit 6b29780

Browse files
updates http2 version used in upgrades and web-api examples
Switched per @seanmonstar's feedback in PR #2961 #2961
1 parent 04fd029 commit 6b29780

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/upgrades.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async fn client_upgrade_request(addr: SocketAddr) -> Result<()> {
9595
.unwrap();
9696

9797
let stream = TcpStream::connect(addr).await?;
98-
let (mut sender, conn) = hyper::client::conn::http2::handshake(stream).await?;
98+
let (mut sender, conn) = hyper::client::conn::http1::handshake(stream).await?;
9999

100100
tokio::task::spawn(async move {
101101
if let Err(err) = conn.await {

examples/web_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn client_request_response() -> Result<Response<Body>> {
2929
let port = req.uri().port_u16().expect("uri has no port");
3030
let stream = TcpStream::connect(format!("{}:{}", host, port)).await?;
3131

32-
let (mut sender, conn) = hyper::client::conn::http2::handshake(stream).await?;
32+
let (mut sender, conn) = hyper::client::conn::http1::handshake(stream).await?;
3333

3434
tokio::task::spawn(async move {
3535
if let Err(err) = conn.await {

0 commit comments

Comments
 (0)