(req_method: Method)
| 44 | } |
| 45 | |
| 46 | async fn default_handler(req_method: Method) -> Result<impl Responder> { |
| 47 | match req_method { |
| 48 | Method::GET => { |
| 49 | let file = NamedFile::open("static/404.html")? |
| 50 | .customize() |
| 51 | .with_status(StatusCode::NOT_FOUND); |
| 52 | Ok(Either::Left(file)) |
| 53 | } |
| 54 | _ => Ok(Either::Right(HttpResponse::MethodNotAllowed().finish())), |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | async fn streaming_response(path: web::Path<String>) -> HttpResponse { |
| 59 | let name = path.into_inner(); |
nothing calls this directly
no outgoing calls
no test coverage detected