Hey,
For the life of me, I don’t understand my the below JSON is posting using application/x-www-form-urlencoded and not application/json.
{
"eventName": "Temperature",
"url": "http://requestb.in/1erqp991",
"headers" : {
"Content-Type": "application/json"
},
"requestType": "POST",
"json": {
"deviceId": "aaaabbbb",
"temperature": 21
},
"mydevices": true
}
Here is the result from RequestBin
FORM/POST PARAMETERS
data: "26.000000"
published_at: 2015-12-20T03:29:40.470Z
event: Temperature
coreid: 370019000f47343337373737
HEADERS
Total-Route-Time: 0
Content-Length: 112
X-Request-Id: bae3846f-1d25-4eb8-bf31-45b2421de1ba
User-Agent: SparkBot/1.0 (http://docs.spark.io/webhooks#bot)
Connect-Time: 1
Host: requestb.in
Content-Type: application/x-www-form-urlencoded
Connection: close
Via: 1.1 vegur
RAW BODY
event=Temperature&data=%2226.000000%22&published_at=2015-12-20T03%3A29%3A40.470Z&coreid=370019000f47343337373737