javascript - Meteor Iron Router How to get POST data -
I am trying to pass post data to an iron router root from meteorite meteorites but it does not work. The request body is empty.
I have tried to output the request body to check whether the data was present or not, but it is only empty.
router.out ('/ api / gateways', function () {body = this.request.body; console.log (this.request) // this.response.write (body ); This.response.end ("called");}, {where: 'server'}) Any ideas? Thank you.
Somewhere else on your server and it should work fine. See more details. request.body is empty because iron URL-encoded data There is a lack of middle-class responsible for the removal. This is a Bug , which will be resolved hopely in later versions. For now, you can just add:
router.com first action (iron router.business.nerncode ({extended: false));
Comments
Post a Comment