mirror of
https://github.com/actix/examples
synced 2025-01-22 22:05:57 +01:00
commit
250fc6eaf1
@ -14,7 +14,7 @@ cargo run
|
|||||||
|
|
||||||
- [http://localhost:8080/](http://localhost:8080/static/index.html)
|
- [http://localhost:8080/](http://localhost:8080/static/index.html)
|
||||||
- [http://localhost:8080/async/bob](http://localhost:8080/async/bob)
|
- [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/user/bob/](http://localhost:8080/user/bob/) text/plain download
|
||||||
- [http://localhost:8080/test](http://localhost:8080/test) (return status switch GET or POST or other)
|
- [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/favicon](http://localhost:8080/static/favicon.htmicol)
|
||||||
- [http://localhost:8080/welcome](http://localhost:8080/static/welcome.html)
|
- [http://localhost:8080/welcome](http://localhost:8080/static/welcome.html)
|
||||||
|
@ -82,7 +82,7 @@ fn with_param(req: HttpRequest) -> HttpResponse {
|
|||||||
println!("{:?}", req);
|
println!("{:?}", req);
|
||||||
|
|
||||||
HttpResponse::Ok()
|
HttpResponse::Ok()
|
||||||
.content_type("test/plain")
|
.content_type("text/plain")
|
||||||
.body(format!("Hello {}!", req.match_info().get("name").unwrap()))
|
.body(format!("Hello {}!", req.match_info().get("name").unwrap()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user