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.

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));  

Somewhere else on your server and it should work fine. See more details.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -