actix_web::web

Function put

source
pub fn put() -> Route
Expand description

Creates a new route with PUT method guard.

ยงExamples

In this example, one PUT /{project_id} route is set up:

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

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

);