warp::filters::method

Function get

source
pub fn get() -> impl Filter<Extract = (), Error = Rejection> + Copy
Expand description

Create a Filter that requires the request method to be GET.

ยงExample

use warp::Filter;

let get_only = warp::get().map(warp::reply);