IBM Bluemix:从Android发出POST请求,以及如何在NodeJS中处理它

我对bluemix mobilefirst平台相当陌生,并且坚持在我需要使用来自android客户端的一些参数提出请求的地方。 我搜查了文档,但无法find所需的。

显然有不止一种方法发送POST请求,我将概述其中之一。

为了看到端到端场景,您可以使用HelloTodo Android示例,该示例使用基于Node.js的Bluemix托pipe的后端 – https://github.com/ibm-bluemix-mobile-services/bms-samples-android- hellotodo 。

此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

服务器端的实现取决于你select使用哪个框架。 最stream行的nodejs框架可能是expressjs – http://expressjs.com/en/4x/api.html#app.post.method