Skip to main content

rust_web_server/body/
mod.rs

1//! Request and response bodies.
2//!
3//! A request body is raw bytes (`Request::body: Vec<u8>`). A response body is a
4//! list of [`ContentRange`](crate::range::ContentRange)s — usually one, several
5//! for a `multipart/byteranges` (range) response.
6//!
7//! Parsers for the common request encodings:
8//!
9//! - [`form_urlencoded`] — `application/x-www-form-urlencoded`
10//! - [`multipart_form_data`] — `multipart/form-data` (each part has headers,
11//!   `Content-Disposition` required, and a body)
12//! - JSON — see [`crate::json`]
13//!
14//! `HEAD` and `OPTIONS` requests carry no body. Examples: `src/body/example/`.
15
16pub mod form_urlencoded;
17pub mod multipart_form_data;
18
19#[cfg(test)]
20mod example;