Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 06edd5fab5d8cd821c13e67f6d4dba84366fe5c5
parent fcd64342fdc9e4d063bfabc5c9f7cc033cde04ac
Author: Denis Andrejew <da.colonel@gmail.com>
Date:   Thu, 14 Mar 2019 16:00:47 +0100

Clarify form method rewriting in requests guide.

Diffstat:
Msite/guide/4-requests.md | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/site/guide/4-requests.md b/site/guide/4-requests.md @@ -52,14 +52,14 @@ your application explicitly handles. ### Reinterpreting -Because browsers can only send `GET` and `POST` requests, Rocket _reinterprets_ -request methods under certain conditions. If a `POST` request contains a body of -`Content-Type: application/x-www-form-urlencoded` and the form's **first** -field has the name `_method` and a valid HTTP method name as its value (such as -`"PUT"`), that field's value is used as the method for the incoming request. -This allows Rocket applications to submit non-`POST` forms. The [todo -example](@example/todo/static/index.html.tera#L47) makes use of this feature to -submit `PUT` and `DELETE` requests from a web form. +Because HTML forms can only be directly submitted as `GET` or `POST` requests, +Rocket _reinterprets_ request methods under certain conditions. If a `POST` +request contains a body of `Content-Type: application/x-www-form-urlencoded` and +the form's **first** field has the name `_method` and a valid HTTP method name +as its value (such as `"PUT"`), that field's value is used as the method for the +incoming request. This allows Rocket applications to submit non-`POST` forms. +The [todo example](@example/todo/static/index.html.tera#L47) makes use of this +feature to submit `PUT` and `DELETE` requests from a web form. ## Dynamic Paths