diff --git a/src/extract/extractor_middleware.rs b/src/extract/extractor_middleware.rs index 77a76872..d075f253 100644 --- a/src/extract/extractor_middleware.rs +++ b/src/extract/extractor_middleware.rs @@ -27,6 +27,10 @@ use tower::{BoxError, Layer, Service}; /// produce any useful output, and run the extractor for several handlers /// without repeating it in the function signature. /// +/// Note that if the extractor consumes the request body, as `String` or +/// [`Bytes`] does, an empty body will be left in its place. Thus wont be +/// accessible to subsequent extractors or handlers. +/// /// # Example /// /// ```rust diff --git a/src/extract/mod.rs b/src/extract/mod.rs index 33e92961..ce6e3550 100644 --- a/src/extract/mod.rs +++ b/src/extract/mod.rs @@ -92,6 +92,9 @@ //! # }; //! ``` //! +//! Note that only one extractor can consume the request body. If multiple body extractors are +//! applied a `500 Internal Server Error` response will be returned. +//! //! # Optional extractors //! //! Wrapping extractors in `Option` will make them optional: