Function httptest::matchers::request::headers[][src]

pub fn headers<M>(inner: M) -> Headers<M>
Expand description

Extract the headers from the HTTP request and pass the sequence to the next mapper.

Example

use httptest::matchers::*;

// A request matcher that matches a request with the header `x-foobar: value`.
request::headers(contains(("x-foobar", "value")));

// A request matcher that matches a request with the header `x-foobar` with any value.
request::headers(contains(key("x-foobar")));