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

时间秒杀一切 提交于 2020-01-16 05:19:08

问题


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 .


回答1:


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



来源:https://stackoverflow.com/questions/36012484/ibm-bluemix-make-post-request-from-android-and-how-to-handle-it-in-nodejs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!