nodeJs 接收请求参数和发送请求参数
接收请求:
request:
(1) req.query
(2) 导入中间件:var
bodyParser = require(
'body-parser'
)
req.body
响应:
response:
res.json()
接收请求:
request:
(1) req.query
(2) 导入中间件:var
bodyParser = require(
'body-parser'
)
req.body
响应:
response:
res.json()