From 6e5e6d81fc3115a08a42e131a28ab8fee15b45e5 Mon Sep 17 00:00:00 2001 From: David Sankel Date: Wed, 14 Aug 2024 08:20:04 +0530 Subject: [PATCH] Improve RequestBuilder::multipart's documentation Making it clear that Content-Type is set will help prevent callers from building maleformed requests where that field is present multiple times. --- src/async_impl/request.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/async_impl/request.rs b/src/async_impl/request.rs index aa900ca02..76b40a788 100644 --- a/src/async_impl/request.rs +++ b/src/async_impl/request.rs @@ -309,6 +309,9 @@ impl RequestBuilder { /// # Ok(()) /// # } /// ``` + /// + /// In additional the request's body, the Content-Type and Content-Length fields are + /// appropriately set. #[cfg(feature = "multipart")] #[cfg_attr(docsrs, doc(cfg(feature = "multipart")))] pub fn multipart(self, mut multipart: multipart::Form) -> RequestBuilder {