I’ve created a custom webhook to post data to a database ingest agent, and it seems to be acting in unexpected ways. Specifically, it is sending data as content-type: application/x-www-form-urlencoded. Really what I need is for it to just send the data I post to the event as straight binary data.
So the CURL command I use is
curl -i -XPOST ‘http://my-server/write?db=iotdata’ --data-binary 'volume_reading value=155’
So I need to send that key/value pair but not as JSON or as url encoded data.
I don’t see an obvious way to do that. In the webhooks creation form on my Console I see that I can fill out Query Parameters but there’s no indication of what those should be.
My on-device code:
String data = String::format(“volume_reading value=%d”, range);
Particle.publish(“Log”, data, PRIVATE);
Certainly calls the webhook. and that webhook certainly posts to the server in question, it just doesn’t post the data.