pub enum Body {
None,
Raw {
content: String,
mime: Mime,
},
Binary {
path: String,
mime: Mime,
},
FormData(BTreeMap<String, FormDataValue>),
XFormUrlEncoded(BTreeMap<String, String>),
}Expand description
Body of the request, it contains all the currently supported options
Variants§
None
The request does not have body (common for GET requests)
Raw
The body of the request is in text format. This body can be bundled with a Content-Type like application/json to send JSONs with full meaning.
Binary
The body of the request contains a file located at the given path. This body can be bundled with Content-Type headers like application/pdf.
FormData(BTreeMap<String, FormDataValue>)
The body is an HTTP form.
XFormUrlEncoded(BTreeMap<String, String>)
The body of the request is an HTTP form encoded in the URL.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more