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:
@ -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> {
|
||||
|
@ -24,7 +24,5 @@
|
||||
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user