This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checks route params (req.params), ex: /user/:id | |
Checks query string params (req.query), ex: ?id=12 | |
Checks urlencoded body params (req.body), ex: id= |
1. application/x-www-form-urlencoded
可以把參數放在URL內傳遞,瀏覽器原生的form表單。
在Express中,使用bodyParser.urlencoded,即可取得query的字串