[][src]Function ntex::web::post

pub fn post<Err: ErrorRenderer>() -> Route<Err>

Create route with POST method guard.

use ntex::web;

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

In the above example, one POST route gets added:

  • /{project_id}