pub type Body = Body<BoxedStream>;
Available on crate feature
async
only.Expand description
Type alias for asynchronous HTTP request bodies.
Aliased Type§
pub enum Body {
Bytes {
content: Cow<'static, [u8]>,
content_type: Cow<'static, str>,
},
Form {
fields: Vec<(Cow<'static, str>, Cow<'static, str>)>,
},
Multipart {
parts: Vec<Part<BoxedStream>>,
},
Stream {
stream: BoxedStream,
content_type: Cow<'static, str>,
},
}
Variants§
Bytes
Raw byte content with a specified content type.
Fields
Form
URL-encoded form data.
Fields
Multipart
Multipart form data, enabled with the “multipart” feature.
Fields
§
parts: Vec<Part<BoxedStream>>
Collection of parts that make up the multipart form.
Stream
Streaming body data.
Fields
§
stream: BoxedStream
The underlying stream that provides the body data.