Skip to main content

put

Function put 

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

Create route with PUT method guard.

use ntex::web;

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

In the above example, one PUT route gets added:

  • /{project_id}