Function ntex::web::head [−][src]
pub fn head<Err: ErrorRenderer>() -> Route<Err>
Expand description
Create route with HEAD
method guard.
use ntex::web;
let app = web::App::new().service(
web::resource("/{project_id}")
.route(web::head().to(|| async { web::HttpResponse::Ok() }))
);
In the above example, one HEAD
route gets added:
- /{project_id}