1
0
mirror of https://github.com/actix/examples synced 2025-01-22 22:05:57 +01:00

Merge pull request #25 from casperin/text-plain

typos -> text/plain
This commit is contained in:
Douman 2018-07-04 11:15:37 +03:00 committed by GitHub
commit 250fc6eaf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ cargo run
- [http://localhost:8080/](http://localhost:8080/static/index.html)
- [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/favicon](http://localhost:8080/static/favicon.htmicol)
- [http://localhost:8080/welcome](http://localhost:8080/static/welcome.html)

View File

@ -82,7 +82,7 @@ fn with_param(req: HttpRequest) -> HttpResponse {
println!("{:?}", req);
HttpResponse::Ok()
.content_type("test/plain")
.content_type("text/plain")
.body(format!("Hello {}!", req.match_info().get("name").unwrap()))
}