I am trying to pass POST data to an Iron Router route from outside meteor but it doesn't work. The request body is empty.
I have tried outputting the request body to check if the data were present, but it's just empty.
Router.route('/api/gatewaysusers', function() {
body = this.request.body;
console.log(this.request)
// this.response.write(body);
this.response.end("Call served");
}, {where: 'server'})
Any idea ? Thank you.
iron-router
side. – Higarequest
andresponse
fromthis
. They are also passed to the callback. The first line can be rewritten asRouter.route('/api/gatewaysusers', (request, response) => {
– Boyla