pub fn method() -> impl Filter<Extract = (Method,), Error = Infallible> + Copy
Expand description

Extract the Method from the request.

This never rejects a request.

Example

use warp::Filter;

let route = warp::method()
    .map(|method| {
        format!("You sent a {} request!", method)
    });