Skip to content

Commit 8241f91

Browse files
authored
docs(examples): fix client request path (#3520)
1 parent b1ee228 commit 8241f91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/client.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ async fn fetch_url(url: hyper::Uri) -> Result<()> {
5555

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

58+
let path = url.path();
5859
let req = Request::builder()
59-
.uri(url)
60+
.uri(path)
6061
.header(hyper::header::HOST, authority.as_str())
6162
.body(Empty::<Bytes>::new())?;
6263

0 commit comments

Comments
 (0)