diff --git a/basics/README.md b/basics/README.md index 53001f17..72ed1e66 100644 --- a/basics/README.md +++ b/basics/README.md @@ -16,6 +16,7 @@ cargo run - [http://localhost:8080/async/bob](http://localhost:8080/async/bob) - [http://localhost:8080/user/bob/](http://localhost:8080/user/bob/) plain/text download - [http://localhost:8080/test](http://localhost:8080/test) (return status switch GET or POST or other) +- [http://localhost:8080/favicon](http://localhost:8080/static/favicon.htmicol) - [http://localhost:8080/welcome](http://localhost:8080/static/welcome.html) - [http://localhost:8080/notexit](http://localhost:8080/static/404.html) display 404 page - [http://localhost:8080/error](http://localhost:8080/error) Panic after request diff --git a/basics/src/main.rs b/basics/src/main.rs index 97d68a5f..ff704557 100644 --- a/basics/src/main.rs +++ b/basics/src/main.rs @@ -98,7 +98,6 @@ fn main() { // async handler .resource("/async/{name}", |r| r.method(Method::GET).a(index_async)) .resource("/test", |r| r.f(|req| { - println!("=============test============="); match *req.method() { Method::GET => HttpResponse::Ok(), Method::POST => HttpResponse::MethodNotAllowed(), @@ -106,7 +105,6 @@ fn main() { } })) .resource("/error", |r| r.f(|req| { - println!("=============error============="); error::InternalError::new( io::Error::new(io::ErrorKind::Other, "test"), StatusCode::OK) })) diff --git a/basics/static/index.html b/basics/static/index.html index e59e13f1..b2fbfcd2 100644 --- a/basics/static/index.html +++ b/basics/static/index.html @@ -87,4 +87,4 @@ - + \ No newline at end of file