use std::path::Path;
-use actix_web::{get, web, App, HttpRequest, HttpServer, Responder, Result};
+use actix_web::{get, route, web, App, HttpRequest, HttpServer, Responder, Result};
use actix_web::http::header;
use actix_web::middleware::Logger;
use actix_files::{Files, NamedFile};
-#[get("/hello/{name}")]
+#[route("/hello/{name}", method="GET", method="HEAD")]
async fn hello(params: web::Path<String>, req: HttpRequest) -> Result<String> {
let name = params.into_inner();