Request and POST Params
(req: HttpRequest, params: web::Form<MyParams>)
| 61 | |
| 62 | /// Request and POST Params |
| 63 | async fn handle_post_3(req: HttpRequest, params: web::Form<MyParams>) -> impl Responder { |
| 64 | println!("Handling POST request: {req:?}"); |
| 65 | |
| 66 | HttpResponse::Ok() |
| 67 | .content_type("text/plain") |
| 68 | .body(format!("Your name is {}", params.name)) |
| 69 | } |
| 70 | |
| 71 | #[cfg(test)] |
| 72 | mod tests { |
no outgoing calls
no test coverage detected