Monday 15 April 2013

RESTFUL API : new Iron Router version this.request.body not working anymore -



RESTFUL API : new Iron Router version this.request.body not working anymore -

i had api functional , working charm lastly updates of iron router (meteor update impact?) command

this.request.body

doesn't render nil when have post phone call on api (all calls work , have no problem this.params), took @ docs , don't see nil talking this, have idea?

thanks help =)

ps : tried replace (without success obviously) : this.params.query.body this.request.query.body when seek json.stringify on this.request empty guess has been moved somewhere...

as asked here https://github.com/eventedmind/iron-router/issues/1003, add:

router.onbeforeaction(iron.router.bodyparser.urlencoded({extended: false}))

in meteor.startup

iron-router

No comments:

Post a Comment