Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RequestBuilder.form() docs #1490

Merged
merged 1 commit into from Mar 3, 2022
Merged

Improve RequestBuilder.form() docs #1490

merged 1 commit into from Mar 3, 2022

Conversation

nihaals
Copy link
Contributor

@nihaals nihaals commented Mar 2, 2022

Based on:

/// Send a form body.
///
/// Sets the body to the url encoded serialization of the passed value,
/// and also sets the `Content-Type: application/x-www-form-urlencoded`
/// header.
///
/// ```rust
/// # use reqwest::Error;
/// # use std::collections::HashMap;
/// #
/// # fn run() -> Result<(), Error> {
/// let mut params = HashMap::new();
/// params.insert("lang", "rust");
///
/// let client = reqwest::blocking::Client::new();
/// let res = client.post("http://httpbin.org")
/// .form(&params)
/// .send()?;
/// # Ok(())
/// # }
/// ```
///
/// # Errors
///
/// This method fails if the passed value cannot be serialized into
/// url encoded format

@nihaals nihaals requested a review from seanmonstar March 3, 2022 18:38
@seanmonstar seanmonstar merged commit f889a7b into seanmonstar:master Mar 3, 2022
@seanmonstar
Copy link
Owner

Thanks so much!

@nihaals nihaals deleted the async-form-doc branch March 3, 2022 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants