1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-19 06:36:36 +00:00
This commit is contained in:
Nikolay Kim 2017-11-29 14:22:47 -08:00
parent 991dd107b1
commit 27035c9454

View file

@ -43,7 +43,7 @@ request handler with the application's `resource` on a particular *HTTP method*
```rust,ignore
let app = Application::default("/")
.resource("/", |r| r.handler(Method::GET, index)
.resource("/", |r| r.get(index))
.finish()
```
@ -73,7 +73,7 @@ fn main() {
HttpServer::new(
Application::default("/")
.resource("/", |r| r.handler(Method::GET, index)))
.resource("/", |r| r.get(index)))
.serve::<_, ()>("127.0.0.1:8088").unwrap();
println!("Started http server: 127.0.0.1:8088");