cURL or HTTP request from Photon

Since this is a “networking” related issue, I figured I’d place it here in the Cloud Software section… Correct me if I’m wrong.

So I have some cloud code sitting on Parse that needs to be executed using either a cURL or HTTP request. For those that don’t know what Parse is, I just need to get a cURL or HTTP request to execute an read the results.

I’ve tried using the httpClient library to no avail - although I doubt I’m using it correctly :confused:

Anyone care to point me in the right direction?

cURL request:
curl -X POST -H “X-Parse-Application-Id: *********” -H “X-Parse-REST-API-Key: *************” -H “Content-Type: application/json” -d ‘{“some: data”, “some_more”: “data”}’ https://api.parse.com/1/functions/createPanic

Thank you :smile:

1 Like

Hi byroncoetsee,

Did you solve your problem? I am looking the same thing but can’t find the solution.

If you have solved it it would be great if you could share.

Thanks!

The original poster's request can’t be done with the httpclient library, because it uses https (TLS/SSL encrypted), which is not supported by httpclient.

There’s an https client for Particle by glowfi.sh.

But by far the easiest way to do this is with a webhook. That’s what I’d do.
https://docs.particle.io/guide/tools-and-features/webhooks/

Rick