handler with path parameters like `/user/{name}`
(req: HttpRequest, Path((name,)): Path<(String,)>)
| 69 | |
| 70 | /// handler with path parameters like `/user/{name}` |
| 71 | async fn with_param(req: HttpRequest, Path((name,)): Path<(String,)>) -> HttpResponse { |
| 72 | println!("{req:?}"); |
| 73 | |
| 74 | HttpResponse::Ok() |
| 75 | .content_type(ContentType::plaintext()) |
| 76 | .body(format!("Hello {name}!")) |
| 77 | } |
| 78 | |
| 79 | #[actix_web::main] |
| 80 | async fn main() -> io::Result<()> { |
nothing calls this directly
no outgoing calls
no test coverage detected