app.post('/admin/movie/new', function(res, req) { console.log("enter app.post_____________________"); console.log(req); console.log(typeof(req)); console.log(req.body);
回复 (7)
I
post还分3种,看看你前端怎么传的 https://github.com/i5ting/node-http
D
我是用的是 app.post啊 没有中说的那三个啊, 它是route. 我是新手 望前辈能指点下
D
引用 i5tingpost还分3种,看看你前端怎么传的 https://github.com/i5ting/node http
@i5ting 我那个fromdata 是Content-Type:application/x-www-form-urlencoded格式
我app.js也使用了bodyparser,还是解析不了 前辈
来自酷炫的 CNodeMD
H
app.post('/user', function (req, res, next) {}); req跟res.......
J
楼主啊 app.post(’/admin/movie/new’, function(res, req)
res 和 req . 写反了 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
终结
J
D
引用 i5tingpost还分3种,看看你前端怎么传的 https://github.com/i5ting/node http
@jkjk77 @hoperce @i5ting 谢谢前辈们的指导,没想到竟然是如此低级的错误,实在是非常的惭愧。
来自酷炫的 CNodeMD
参与回复
登录后即可参与回复。登录