更新时间:2022-12-07 19:50:06
此代码修复了这种情况:
This code fixed the situation:
app.use(bodyParser.urlencoded({ extended: true }));
req.body.task
undefined
直到 extended
设置为 true
以支持URL编码的主体。
req.body.task
was undefined
until extended
was set to true
to support URL-encoded bodies.