logo
pub fn Post() -> impl Guard
Expand description

Creates a guard that matches the POST request method.

Examples

The route in this example will only respond to POST requests.

use actix_web::{guard, web, HttpResponse};

web::route()
    .guard(guard::Post())
    .to(|| HttpResponse::Ok());