So I have code that pushes data (GPS coordinates) to a bucket, and until recently this code worked perfectly. Thinger.io apparently made some changes at the start of May (new platform release), and the code has since not worked.
Now, this is usually a good indication where to start, changes are made and stuff stops working! I first thought that the API was changed or something, but when trying the request through the postman service using the exact same URL, authorisation token and input data, the data is updated successfully, so apparently the API still works, and I’m left thinking it might be something with my syntax or the way I build the HTTP post request since the error I receive is this: “{“error”:{“message”:“Content-Type must be application/json”}}”?
I’m using an Arduino Leonardo with a SIM900 development board.
The output from the application is as follows (it also outputs the commands pushed to thinger API):
AT
OK
AT+CMGF=1
OK
AT+CNMI=1,2,0,0,0
OK
AT+SAPBR=3,1,"CONTYPE","GPRS"
OK
AT+SAPBR=3,1,"APN","TeleXXX"
OK
AT+SAPBR=1,1
OK
AT+SAPBR=2,1
+SAPBR: 1,1,"46.156.55.XXX"
OK
AT+HTTPINIT
OK
AT+HTTPPARA="CID",1
OK
AT+HTTPPARA="URL","http://backend.thinger.io/v3/users/tom/devices/CT/callback/data?authorization=eyJhbGKLJSDFKLJSsdfsdfsdf.eyJqdGkiOiJEZXZpY2VDYWxsYmFja19DVCIsInVzciI6InRvcm1vZCJ9.AR1gWvIZB9KmtI-5Z12YXKuchPTGn58AkwBJSZQIoxQ"
OK
AT+HTTPPARA="CONTENT","application/json"
OK
AT+HTTPDATA=51,10000
DOWNLOAD
{ "longitude" : 5.336664 , "latitude" : 50.365433 }
OK
AT+HTTPACTION=1
OK
+HTTPACTION:1,400,61
AT+HTTPREAD
+HTTPREAD:61
{"error":{"message":"Content-Type must be application/json"}}
OK
AT+HTTPTERM
OK