Don't want URL encoding of & and = for webhook


#1

I’m trying to use a Product webhook that takes a single pre-formatted GET string. I don’t want to have to define each possible parameter in the webhook itself.

Product webhook: GET, Query parameters:

{
“X-API-KEY”: “{{key}}”
}

Sending to requestb.in for debugging. GET string I want to see generated by the webhook.

GET /17yew01?X-API-KEY=9d55ca639a860237&address=STE1704002&limit=10

Instead I receive:

GET /17yew01?X-API-KEY=9d55ca639a860237%26amp%3Baddress%3DSTE1704002%26amp%3Blimit%3D10

I read that triple curly braces should prevent encoding. I tried:

{
“X-API-KEY”: “{{{key}}}”
}

And I get:

GET /17yew01?X-API-KEY=9d55ca639a860237%26address%3DSTE1704002%26limit%3D10

My Electron code:

String output = "{\"key\":\"" + DeviceKey;
output.concat("&address=" + DeviceID);
output.concat("&limit=10");
output.concat("\"}");
success = Particle.publish("commands", output, NO_ACK, PRIVATE);

Any idea how I can prevent the & and = from getting encoded?


#2

I think you’ll have to