Hello everyone,
I’m trying to make a webhook that will push data captured by my core to sparkfun datastore, you can go to data.sparkfun.com and make a new stream, which will store data coming from GET requests.
I know I can use HttpClinet, but I don’t want to use it because of blocking issues.
I have 2 params, I called them param1, prarm2, and a timestamp
, the GET request should look something like this:
http://data.sparkfun.com/input/(my_public_key)?private_key=(my_private_key)¶m1=value¶m2=value×tamp=value
I created a get webhook and pushed it to spark cloud, here is it
{
"eventName": "sparkfun",
"url": "http://data.sparkfun.com/input/(my_public_key)",
"requestType": "GET",
"query": {
"private_key": "{{private_key}}",
"param1": "{{param1}}",
"param2": "{{param2}}",
"timestamp": "{{SPARK_PUBLISHED_AT}}"
},
"mydevices": true
}
It has been pushed successfully.
in my firmware i’m calling the webhook like this
Spark.publish("sparkfun", "{ \"private_key\": \"(my_private_key)\", \"param1\": \"value\", \"param2\": \"value\" }", 60, PRIVATE);
I subescribed to my core events using spark subscribe mine
command, but i’m not seeing any thing, and there is nothing in the datastore!!
what could be the problem??
Thank you