actix_web::web

Function post

source
pub fn post() -> Route
Expand description

Creates a new route with POST method guard.

ยงExamples

In this example, one POST /{project_id} route is set up:

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

let app = App::new().service(
    web::resource("/{project_id}")
         .route(web::post().to(|| HttpResponse::Ok()))

);