[英]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. 我对bluemix mobilefirst格式相当陌生,并停留在需要从android客户端发出带有一些参数的发布请求的地方。 I have searched the documentation but not able to find the required .
我已经搜索了文档,但找不到所需的。
Obviously there is more than one way to send POST requests, I'll outline one of them. 显然,有多种方法可以发送POST请求,我将概述其中之一。
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 . 为了查看端到端方案,您可以使用HelloTodo Android示例,该示例使用基于node.js的Bluemix托管后端-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 此Android示例中的POST请求是使用Request类发出的,该类是Bluemix Mobile Services SDK的一部分-https: //github.com/ibm-bluemix-mobile-services/bms-samples-android-hellotodo/blob/master/ helloTodo /应用/ src目录/主/ 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
最受欢迎的Node.js框架可能是expressjs- http: //expressjs.com/en/4x/api.html#app.post.method
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.