kahmali / meteor-restivus

REST APIs for the Best of Us! - A Meteor 0.9+ package for building REST APIs https://atmospherejs.com/nimble/restivus
MIT License
544 stars 116 forks source link

how to receive the request from XML?Thanks. #237

Open shaohaojun opened 8 years ago

shaohaojun commented 8 years ago

I wrote the code:

var Api = new Restivus({ apiPath: 'family/third/', useDefaultAuth: true, defaultHeaders: { 'Content-Type': 'application/json' }, prettyJson: true });

Api.addRoute('syncUser', {authRequired: false,headers: { 'Content-Type': 'application/xml', 'X-Custom-Header': 'custom value' }}, { post: function () { console.log(this.bodyParams); return ""; }

})

but this But it prints out "{}". So I want to ask how to solve.Thanks

santiq commented 8 years ago

Maybe this issue can help you #61