Closed gaurav341 closed 7 years ago
@gaurav341 I'm not sure what the issue is without more code to base it off of, but tasksMbaasRequest.post
should be working. I've used this module to POST like so:
eventsHttp({
method: 'POST',
uri: '/events/ticket',
timeout: 25000,
json: {id: 12345}
}, callback);
My guess is you need to add the body-parser
to your MBaaS route like so:
app.post('/list', require('body-parser').json(), function(req, res) {
console.log(req.body); //getting req.body is {}
})
Let me know if this works for you.
@gaurav341 I will assume this is working now. I can confirm it is working in projects we're developing.
Basically i've a MBaaS service and a cloud app on RHMAP. I'm creating a post call from my cloud app to MBaaS service which is like
Cloud app code
MBaaS service code
Expected result
{id: 123456}