Skip to content

Commit

Permalink
docs: Improve RequestBuilder::multipart's documentation (#2388)
Browse files Browse the repository at this point in the history
Making it clear that Content-Type is set will help prevent callers from
building maleformed requests where that field is present multiple times.
  • Loading branch information
camio authored Aug 14, 2024
1 parent 8c7f338 commit bfd31be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/async_impl/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bfd31be

Please sign in to comment.