jwcooper wrote:You could send the data as a group of 3 feeds. Or you can just send them each 3 times as individual feeds of x,y,z. Groups will be more efficient, but a bit more complicated to code.
{
"feeds": {
"humidity": 45,
"temperature": 80
},
"location": {
"lat": 45.539999999999999,
"lon": -93.343500000000006
}
}
Accept: */*
Accept-Encoding: gzip, deflate
Content-Type: application/json
x-aio-key: secret key
Accept-Language: en-us
{
"feeds": {
"humidity": 45,
"temperature": 80
},
"location": {
"lat": 45.539999999999999,
"lon": -93.343500000000006
}
}
PUT /hepaestus/feeds/temperature_f.json HTTP/1.1
Accept: */*
Accept-Encoding: gzip,deflate
Content-Type: application/json
x-aio-key: SECRET_KEY
Accept Language: en-us
{"feeds":{ "humidity": 37.80,"temperature_f": 71.06},"location": { "lat": 42.306640, "lon": -72.644436}}
HTTP/1.0 400 Bad request
Cache-Control: no-cache
Connection: close
Content-Type: text/html
<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>