I'm trying to set the right parameters for http request, but I'm not able to do it.
The query with curl is this:
curl -H "Content-Type: application/json" -X GET -d '{"auth_key":"xf79rra", "payload":null}' https://retepaiot.it/sensordata/0018b1213
and it works.
I think I made somethings wrong passing auth_key and payload (they are not via URL).
I use the function to prepare the message:
msg.headers = {
- "Content-Type": "application/json"*
- } *
msg.payload = {};
*msg.payload = {auth_key:"xf79rra", * - payload:null};*
return msg;
and http request for URL:
https://retepaiot.it/sensordata/0018b1213
the returned message is:
{ "message": "Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)"}
Can I have some help?
Thanks,
Fabrizio