- Fri Jun 12, 2015 2:37 am
#20236
Your line
POST /api/v1.6/variables/5579297d76256b3560cd2e/values HTTP/1.1 Content-Type: application/json Content-Length: 14 X-Auth-Token: qGd3CE08Gny9YtIzsdW41u6kepwHHDW6DjUde6EeUyjJdonsVepTQ3EvOBHost: things.ubidots.com
Suggested by Ubidots
client.println("POST /api/v1.6/variables/"+idvariable+"/values HTTP/1.1");
client.println("Content-Type: application/json");
client.println("Content-Length: "+String(num));
client.println("X-Auth-Token: "+token);
client.println("Host: things.ubidots.com\n");
client.print(var);
Can you set it up like that in your coding with new lines between?
Do you have "var" in there - thats the value being posted.
The whole lot has got to be a string ""
If you are getting a 404 though its not finding your variable page perhaps. You have to generate that variables key on its setup page Are you sure you have that right . Perhaps something ive said here might help but I've never used below
I think its the lines though. Its expecting a line break between strings.
connout:on("receive", function(connout, payloadout)
print (payloadout);
if (string.find(payloadout, "400 Bad Request") ~= nil) then
print("BAD POST");