pub fn body<M>(inner: M) -> Body<M>
Expand description
Extract the body from the HTTP request and pass it to the next mapper.
Example
use httptest::matchers::*;
// A request matcher that matches a body of `foobar`.
request::body("foobar");
// A request matcher that matches a json encoded body of `{"foo": 1}`
request::body(json_decoded(eq(serde_json::json!({
"foo": 1,
}))));