Struct reqwest_wasm::multipart::Form
source · pub struct Form { /* private fields */ }
Expand description
An async multipart/form-data request.
Implementations§
source§impl Form
impl Form
sourcepub fn text<T, U>(self, name: T, value: U) -> Formwhere
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
pub fn text<T, U>(self, name: T, value: U) -> Formwhere
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
Add a data field with supplied name and value.
Examples
let form = reqwest::multipart::Form::new()
.text("username", "seanmonstar")
.text("password", "secret");
sourcepub fn part<T>(self, name: T, part: Part) -> Formwhere
T: Into<Cow<'static, str>>,
pub fn part<T>(self, name: T, part: Part) -> Formwhere
T: Into<Cow<'static, str>>,
Adds a customized Part.
sourcepub fn percent_encode_path_segment(self) -> Form
pub fn percent_encode_path_segment(self) -> Form
Configure this Form
to percent-encode using the path-segment
rules.
sourcepub fn percent_encode_attr_chars(self) -> Form
pub fn percent_encode_attr_chars(self) -> Form
Configure this Form
to percent-encode using the attr-char
rules.
sourcepub fn percent_encode_noop(self) -> Form
pub fn percent_encode_noop(self) -> Form
Configure this Form
to skip percent-encoding