Skip to content

Instantly share code, notes, and snippets.

@a1exlism
Created July 27, 2016 14:33
Show Gist options
  • Select an option

  • Save a1exlism/89a62c0619f2db6cc5774f1629a304e9 to your computer and use it in GitHub Desktop.

Select an option

Save a1exlism/89a62c0619f2db6cc5774f1629a304e9 to your computer and use it in GitHub Desktop.
express
req.query: 处理 get 请求,获取 get 请求参数
req.params: 处理 /:xxx 形式的 get 或 post 请求,获取请求参数
req.body: 处理 post 请求,获取 post 请求体
req.param(): 处理 get 和 post 请求,但查找优先级由高到低为 req.params→req.body→req.query
From: https://github.com/nswbmw/N-blog/wiki/第1章--一个简单的博客
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment