I want to display google map link in data point.
I am done with configure device and added “link” with string and I am giving my code line which I wrote for this project.
String PostValue = “{“device_id”: 61121695805, “slave_id”: 1”;
PostValue = PostValue + “,“dts”:” +timestamp;
PostValue = PostValue +",“data”:{“latitude”:" + latitude +",“longitude”:" + longitude +",“link”:" + link+"}"+"}";
I got this error :
connecting to api.thingsai.io
inside get timestamp
timestamp receieved
1547037214
inside ThingsCloudPost
{“device_id”: 61121695805, “slave_id”: 1,“dts”:1547037214,“data”:{“Latitude”:21.153782,“Longitude”:72.776306,“Link”:https://www.google.com/maps/search/?api=1&query=21.153782,72.776306}}
Connect to server via port 443
Connected to server!
Waiting for response …HTTP/1.1 400 Bad Request
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 284
ETag: W/"11c-PtGsnMC0x2vnMfr4WIwn+ZoI7Ds"
Date: Wed, 09 Jan 2019 12:32:59 GMT
Connection: keep-alive
{“expose”:true,“statusCode”:400,“status”:400,“body”:"{“device_id”: 61121695805, “slave_id”: 1,“dts”:1547037214,“data”:{“Latitude”:21.153782,“Longitude”:72.776306,“Link”:https://www.google.com/maps/search/?api=1&query=21.153782,72.776306}}",“type”:“entity.parse.failed”}////////////////////// THE END /////////////////////