From 8241f91f5bf9bc8def35cc214a5219ad1a39f71e Mon Sep 17 00:00:00 2001 From: dswij Date: Fri, 12 Jan 2024 22:45:52 +0800 Subject: [PATCH] docs(examples): fix client request path (#3520) --- examples/client.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/client.rs b/examples/client.rs index 046f59de02..a64c35273b 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -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::::new())?;