nisarga lolage
nisarga lolage

Reputation: 661

IBM bluemix : make POST request from Android and how to handle it in NodeJS

I am fairly new to the bluemix mobilefirst paltform and stuck at the point where I need to make post request with some parameters from the android client side. I have searched the documentation but not able to find the required .

Upvotes: 1

Views: 277

Answers (1)

Anton
Anton

Reputation: 3166

Obviously there is more than one way to send POST requests, I'll outline one of them.

In order to see end-to-end scenario you can use the HelloTodo Android sample, which uses node.js based Bluemix hosted backend - https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellotodo.

A POST request in this Android sample is made using Request class, which is part of Bluemix Mobile Services SDK - https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellotodo/blob/master/helloTodo/app/src/main/java/com/ibm/hellotodo/MainActivity.java#L255

Server side implementation depends on which framework you chose to use. The most popular nodejs framework would probably be expressjs - http://expressjs.com/en/4x/api.html#app.post.method

Upvotes: 2

Related Questions