diff --git a/_stable/client/basic.md b/_stable/client/basic.md index d085b62..32f8e1d 100644 --- a/_stable/client/basic.md +++ b/_stable/client/basic.md @@ -115,6 +115,7 @@ tokio::task::spawn(async move { # .uri(url) # .header(hyper::header::HOST, authority.as_str()) # .body(Empty::::new())?; +# sender.ready().await?; # let mut res = sender.send_request(req).await?; # Ok(()) # } @@ -165,6 +166,7 @@ let req = Request::builder() .body(Empty::::new())?; // Await the response... +sender.ready().await?; let mut res = sender.send_request(req).await?; println!("Response status: {}", res.status()); @@ -220,6 +222,7 @@ use tokio::io::{stdout, AsyncWriteExt as _}; # .uri(url) # .header(hyper::header::HOST, authority.as_str()) # .body(Empty::::new())?; +# sender.ready().await?; # let mut res = sender.send_request(req).await?; // Stream the body, writing each frame to stdout as it arrives while let Some(next) = res.frame().await {