0
流星1.2鐵路由器流星1.2,this.request.body是空
Router.route('/upload', {
where: 'server',
action: function(){
console.log(this.request.body);
this.response.end(JSON.stringify(this.request.body));
}
});
我正在使用前面提到issues線。
if (Meteor.isServer) {
Router.onBeforeAction(Iron.Router.bodyParser.urlencoded({
extended: false
}));
}
答案仍然是{}。這與流星1.2打破了嗎?現在有什麼解決方案?
這只是爲我節省了很多時間。這段代碼非常重要,很有趣,很難找到。謝謝! – jremi