[][src]Function httptest::mappers::request::method_path

pub fn method_path<M, P>(method: M, path: P) -> MethodPath<M, P>

A convenience matcher for both method and path. Extracts a bolean true if the method and path both match.

method_path(a, b) == all_of![method(a), path(b)]

Example

use httptest::mappers::*;

// A request matcher that matches a `GET` request to `/foo`.
request::method_path("GET", "/foo");