課程
/前端開發(fā)
/Node.js
/node建站攻略(二期)——網(wǎng)站升級
出現(xiàn)一個問題,為什么我從body中獲取不到movie,我debug查看的時候movie是undefined,但是req.body里面有name的參數(shù)
2015-03-21
源自:node建站攻略(二期)——網(wǎng)站升級
正在回答
新版express不包含bodyParser了,所以加入以下代碼替代之前的use
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
舉報
幫助你深入前后端開發(fā)留下的迷惑,為進一步自學打下基礎(chǔ)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2015-03-24
新版express不包含bodyParser了,所以加入以下代碼替代之前的use
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())