Function httptest::matchers::len [−][src]
pub fn len<M>(inner: M) -> Len<M>
extract the length of the input.
Example
use httptest::matchers::*; // A request matcher that matches a header `x-foobar` and the value has the length of 3. request::headers(contains(("x-foobar", len(eq(3))))); // A request matcher that matches a request with two query parameters. request::query(url_decoded(len(eq(2)))); // A request matcher that matches a body with the length of 42. request::body(len(eq(42)));