I'm having issues with the httpJob library
I have no problems in reading variables from the cloud using GET and call function from the cloud using POST.
The problem is when I want to get EVENTS from the cloud. Can’t make it work.
I use the same function as for reading variable (GET) but it doesn’t work.
This is what I send using the GET :
http = "https://api.particle.io/v1/devices/DEVICE_ID/events?access_token=MY_TOKEN"
jobGet.Download(http)
From Particle io reference documentation :
Definition
GET /v1/events/:eventPrefix
Example request :
curl "https://api.particle.io/v1/events/temp?access_token=1234"
Example Response:
GET /v1/events/temp
HTTP/1.1 200 OK
k
event: temperature
data: {"data":"25.34","ttl":"60","published_at":"2015-07-18T00:12:18.174Z","coreid":"0123456789abcdef01234567"}
If I do it on terminal, it works.
On B4I, i doen't work.
Any idea?
If I execute the exact same command on my windows terminal, it works. I see my event when it occurs.
I have no problems in reading variables from the cloud using GET and call function from the cloud using POST.
The problem is when I want to get EVENTS from the cloud. Can’t make it work.
I use the same function as for reading variable (GET) but it doesn’t work.
This is what I send using the GET :
http = "https://api.particle.io/v1/devices/DEVICE_ID/events?access_token=MY_TOKEN"
jobGet.Download(http)
From Particle io reference documentation :
Definition
GET /v1/events/:eventPrefix
Example request :
curl "https://api.particle.io/v1/events/temp?access_token=1234"
Example Response:
GET /v1/events/temp
HTTP/1.1 200 OK
k
event: temperature
data: {"data":"25.34","ttl":"60","published_at":"2015-07-18T00:12:18.174Z","coreid":"0123456789abcdef01234567"}
If I do it on terminal, it works.
On B4I, i doen't work.
Any idea?
If I execute the exact same command on my windows terminal, it works. I see my event when it occurs.