improve docs around Body type
This commit is contained in:
@@ -156,6 +156,10 @@ impl RequestBuilder {
|
||||
|
||||
/// Set the request body.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Using a string:
|
||||
///
|
||||
/// ```rust
|
||||
/// # fn run() -> Result<(), Box<::std::error::Error>> {
|
||||
/// let client = reqwest::Client::new()?;
|
||||
@@ -166,6 +170,8 @@ impl RequestBuilder {
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
/// Using a `File`:
|
||||
///
|
||||
/// ```rust
|
||||
/// # use std::fs;
|
||||
/// # fn run() -> Result<(), Box<::std::error::Error>> {
|
||||
@@ -178,6 +184,8 @@ impl RequestBuilder {
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
/// Using arbitrary bytes:
|
||||
///
|
||||
/// ```rust
|
||||
/// # use std::fs;
|
||||
/// # fn run() -> Result<(), Box<::std::error::Error>> {
|
||||
|
||||
Reference in New Issue
Block a user