Skip to content

Commit 111d038

Browse files
glendcseanmonstar
glendc
authored andcommittedJun 28, 2024
docs(client): better describe Uri forms are sent as-is
Closes #3693
1 parent aa7ff60 commit 111d038

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎src/client/conn/http1.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,16 @@ where
176176
///
177177
/// `req` must have a `Host` header.
178178
///
179-
/// Absolute-form `Uri`s are not required. If received, they will be serialized
180-
/// as-is.
179+
/// # Uri
180+
///
181+
/// The `Uri` of the request is serialized as-is.
182+
///
183+
/// - Usually you want origin-form (`/path?query`).
184+
/// - For sending to an HTTP proxy, you want to send in absolute-form
185+
/// (`https://hyper.rs/guides`).
186+
///
187+
/// This is however not enforced or validated and it is up to the user
188+
/// of this method to ensure the `Uri` is correct for their intended purpose.
181189
pub fn send_request(
182190
&mut self,
183191
req: Request<B>,

0 commit comments

Comments
 (0)