[][src]Function ntex::web::delete

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

Create route with DELETE method guard.

use ntex::web;

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

In the above example, one DELETE route gets added:

  • /{project_id}