Function ajars_actix_web::actix_web::web::get[][src]

pub fn get() -> Route
Expand description

Create route with GET method guard.

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

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

In the above example, one GET route gets added:

  • /{project_id}