我想通过POST数据从流星外部的铁路由器路由,但它不工作。请求正文为空。流星铁路由器如何获得POST数据
我已经尝试输出请求体来检查数据是否存在,但它只是空的。
Router.route('/api/gatewaysusers', function() {
body = this.request.body;
console.log(this.request)
// this.response.write(body);
this.response.end("Call served");
}, {where: 'server'})
任何想法?谢谢。
可能的重复[如何访问流星中的请求参数?](http://stackoverflow.com/questions/11799079/how-do-i-access-request-parameters-in-meteor) – 2014-11-05 02:26:54
@ChristianFritz它是不是重复的。这里的代码非常好,问题出在'铁路由器'方面。 – 2014-11-05 08:16:06