[−][src]Function httptest::mappers::request::body
pub fn body<M>(inner: M) -> Body<M>
Extract the body from the HTTP request and pass it to the next mapper.
Example
use httptest::mappers::*; // 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, }))));