0

I have created rest service using .js file on Parse.com. I want to access cloud function from arduino.

i tried this

client.get(https://myAppID:[email protected]/1/functions/hello");

i am getting error "Method not allowed".

Solution : Somehow i got the answer which is as follows.I hope it will help others.

 ParseCloudFunction cloudFunction;
 cloudFunction.setFunctionName(function_name);  //string ("hello")
 cloudFunction.add("light_sensor", light); //pass parameter to cloud

 ParseResponse response = cloudFunction.send();
 Serial.println(response.getJSONBody());
2
  • What is a rest service? Commented Oct 29, 2015 at 7:01
  • REST api i have written on Parse side that i want to access from Arduino sketch. Commented Nov 2, 2015 at 10:57

1 Answer 1

0

I read api of Parse and there i got the class to call cloud function from Arduino.I hope it will help others.

 ParseCloudFunction cloudFunction;
 cloudFunction.setFunctionName(fnname); //String ("hello")
 cloudFunction.add("light_sensor", 139); //parameter

 ParseResponse response = cloudFunction.send();
 Serial.println(response.getJSONBody());
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.