Closed deadprogram closed 10 years ago
You should have received a 401 not authorized response since you didn't pass the token on the request. Looking into this now...
It looks like it works if you include your token:
curl -X PUT -d "awesome=sauce&token=gquid3fv7uys0pb981h8tewitumu0udi" http://skynet.im/devices/eccce711-99a2-11e3-ae08-ff6ac0f6a82e
{"uuid":"eccce711-99a2-11e3-ae08-ff6ac0f6a82e","awesome":"sauce","timestamp":1392841973780,"eventCode":401,"_id":"530514f5e11d49b2330000e4"}
curl http://skynet.im/devices/eccce711-99a2-11e3-ae08-ff6ac0f6a82e
{"_id":"53051176e11d49b23300003d","appName":"skynetDemo","awesome":"sauce","channel":"main","online":false,"socketId":"JIn2CPl0iJG5hJX6yTTh","timestamp":1392841973780,"uuid":"eccce711-99a2-11e3-ae08-ff6ac0f6a82e","eventCode":500}p
I also received an error on my call without a token but it was a 404 instead of a 401:
curl -X PUT -d "awesome=nada" http://skynet.im/devices/eccce711-99a2-11e3-ae08-ff6ac0f6a82e
{"error":{"message":"Device not found or token not valid","code":404},"timestamp":1392842098764,"eventCode":401,"_id":"53051572e11d49b2330000e5"}
Token is required to update device.
I created a test object in the database, then tried to update it. The call appears to succeed, however subsequent calls did not appear to persist the data. Here is my command line:
Looking at my local skynet log, it would appear no errors occurred, even tho the data was not saved:
Any thoughts?