1
0
mirror of https://github.com/actix/actix-website synced 2025-06-30 00:34:58 +02:00

Updates front-page examples: powerful-extractor and easy-form-handling.

This commit is contained in:
Cameron Dershem
2019-06-12 19:23:51 -04:00
parent cbd27e7668
commit 118286afb1
6 changed files with 101 additions and 21 deletions

View File

@ -8,10 +8,10 @@ struct Register {
country: String,
}
fn index() -> actix_web::Result<HttpResponse> {
Ok(HttpResponse::Ok()
fn index() -> HttpResponse {
HttpResponse::Ok()
.content_type("text/html; charset=utf-8")
.body(include_str!("../static/form.html")))
.body(include_str!("../static/form.html"))
}
fn register(params: web::Form<Register>) -> actix_web::Result<HttpResponse> {

View File

@ -24,7 +24,5 @@
</form>
<hr>
</body>
</html>