pub struct Form { /* private fields */ }
Expand description
An async multipart/form-data request.
Implementations
sourceimpl Form
impl Form
sourcepub fn text<T, U>(self, name: T, value: U) -> Form where
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
pub fn text<T, U>(self, name: T, value: U) -> Form where
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
Add a data field with supplied name and value.
Examples
let form = reqwest::async::multipart::Form::new()
.text("username", "seanmonstar")
.text("password", "secret");
sourcepub fn part<T>(self, name: T, part: Part) -> Form where
T: Into<Cow<'static, str>>,
pub fn part<T>(self, name: T, part: Part) -> Form where
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
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Form
impl Send for Form
impl !Sync for Form
impl Unpin for Form
impl !UnwindSafe for Form
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more