From db3cf1264939161d9f246077bdd4c2071e6d1333 Mon Sep 17 00:00:00 2001 From: glendc Date: Fri, 28 Jun 2024 00:47:51 +0200 Subject: [PATCH] improve uri docs for send_request of http1 send request --- src/client/conn/http1.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/client/conn/http1.rs b/src/client/conn/http1.rs index de72758284..66f1c0328e 100644 --- a/src/client/conn/http1.rs +++ b/src/client/conn/http1.rs @@ -176,8 +176,15 @@ where /// /// `req` must have a `Host` header. /// - /// Absolute-form `Uri`s are not required. If received, they will be serialized - /// as-is. + /// # Uri + /// + /// - The `Uri` of the request is serialized as-is; + /// - Usually you want absolute-path form (`/path?query`), as that is in general + /// expected for non CONNECT requests. + /// - For CONNECT requests, you do want an absolute-form `Uri`. + /// + /// This is however not enforced or validated and it is up to the user + /// of this method to ensure the `Uri` is correct for their intended purpose. pub fn send_request( &mut self, req: Request,