Skip to content

Commit

Permalink
docs(examples): fix client request path (hyperium#3520)
Browse files Browse the repository at this point in the history
  • Loading branch information
dswij authored Jan 12, 2024
1 parent b1ee228 commit 8241f91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ async fn fetch_url(url: hyper::Uri) -> Result<()> {

let authority = url.authority().unwrap().clone();

let path = url.path();
let req = Request::builder()
.uri(url)
.uri(path)
.header(hyper::header::HOST, authority.as_str())
.body(Empty::<Bytes>::new())?;

Expand Down

0 comments on commit 8241f91

Please sign in to comment.