[][src]Function ntex::web::get

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

Create route with GET method guard.

use ntex::web;

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

In the above example, one GET route gets added:

  • /{project_id}