[][src]Function requiem_web::web::post

pub fn post() -> Route

Create route with POST method guard.

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

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

In the above example, one POST route get added:

  • /{project_id}