Skip to main content

delete

Function delete 

Source
pub fn delete<St: State, U: 'static>() -> Route<St, U>
Expand description

Create route with DELETE method guard.

use ntex::web;

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

In the above example, one DELETE route gets added:

  • /{project_id}