I tried the Parse B4A module example and it works great.
But I want to run some logic on Parse.com using their Cloud Code and they say the way you call it is using HTTP POST - unfortunately I cannot find any examples of this.
I started with calling a simple "Hello World" function I created but all I'm getting back is the response "Unauthorized". Does anyone have any knowledge on this? What am I doing wrong?
Here is my code:
Dim hj As HttpJob
hj.Initialize("HelloJob", Me)
hj.GetRequest.InitializePost2("https://api.parse.com/1/functions/hello", "".GetBytes("UTF-8"))
hj.GetRequest.SetHeader("X-Parse-Application-Id", myappkey)
hj.GetRequest.SetHeader("X-Parse-REST-API-Key", myapikey)
hj.GetRequest.SetContentType("application/json")
hj.PostString("https://api.parse.com/1/functions/hello", "")
Thanks in advance!
But I want to run some logic on Parse.com using their Cloud Code and they say the way you call it is using HTTP POST - unfortunately I cannot find any examples of this.
I started with calling a simple "Hello World" function I created but all I'm getting back is the response "Unauthorized". Does anyone have any knowledge on this? What am I doing wrong?
Here is my code:
Dim hj As HttpJob
hj.Initialize("HelloJob", Me)
hj.GetRequest.InitializePost2("https://api.parse.com/1/functions/hello", "".GetBytes("UTF-8"))
hj.GetRequest.SetHeader("X-Parse-Application-Id", myappkey)
hj.GetRequest.SetHeader("X-Parse-REST-API-Key", myapikey)
hj.GetRequest.SetContentType("application/json")
hj.PostString("https://api.parse.com/1/functions/hello", "")
Thanks in advance!