📜  req.body 未定义 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:17.603000             🧑  作者: Mango

代码示例1
var bodyParser = require('body-parser')
var app = express()

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))

// parse application/json
app.use(bodyParser.json())