Skip to content
Myr

Doc typo

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent fa01388 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:docs/guide.md+5 added-5 removed
270 unmodified lines
271We have seen _app.get()_ a few times, however Express also exposes other familiar HTTP verbs in the same manor, such as _app.post()_, _app.del()_, etc.272273 A common example for _POST_ usage, is when "submitting" a form. Below we simply set our form method to "post" in our html, and control will be given to the route we have defined below it.274 275 <form method="post" action="/">276 <input type="text" name="user[name]" />277 <input type="text" name="user[email]" />278 <input type="submit" value="Submit" />279 </form>275 <form method="post" action="/">276 <input type="text" name="user[name]" />277 <input type="text" name="user[email]" />278 <input type="submit" value="Submit" />279 </form>280281By default Express does not know what to do with this request body, so we should add the _bodyDecoder_ middleware, which will parse _application/x-www-form-urlencoded_ request bodies and place the variables in _req.body_. We can do this by "using" the middleware as shown below:282283 app.use(express.bodyDecoder());
630 unmodified lines