File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,10 @@ async fn fetch_url(url: hyper::Uri) -> Result<()> {
54
54
} ) ;
55
55
56
56
let authority = url. authority ( ) . unwrap ( ) . clone ( ) ;
57
+ let uri = url. path_and_query ( ) . map ( |p| p. as_str ( ) ) . unwrap_or ( "/" ) ;
57
58
58
59
let req = Request :: builder ( )
59
- . uri ( url )
60
+ . uri ( uri )
60
61
. header ( hyper:: header:: HOST , authority. as_str ( ) )
61
62
. body ( Empty :: < Bytes > :: new ( ) ) ?;
62
63
Original file line number Diff line number Diff line change @@ -43,10 +43,11 @@ async fn fetch_json(url: hyper::Uri) -> Result<Vec<User>> {
43
43
} ) ;
44
44
45
45
let authority = url. authority ( ) . unwrap ( ) . clone ( ) ;
46
+ let uri = url. path_and_query ( ) . map ( |p| p. as_str ( ) ) . unwrap_or ( "/" ) ;
46
47
47
48
// Fetch the url...
48
49
let req = Request :: builder ( )
49
- . uri ( url )
50
+ . uri ( uri )
50
51
. header ( hyper:: header:: HOST , authority. as_str ( ) )
51
52
. body ( Empty :: < Bytes > :: new ( ) ) ?;
52
53
You can’t perform that action at this time.
0 commit comments