Escape Custom Replacement Keys in ThingHTTP | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Escape Custom Replacement Keys in ThingHTTP
Avatar
mandelkind
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
1
November 1, 2016 - 9:10 am
sp_Permalink sp_Print sp_EditHistory

How may I escape custom replacement keys in ThingHTTP?

https://ch.mathworks.com/help/thingspeak/thinghttp-app.html#bvevu2b-5

 

I've managed to get an API request up and running and everything seems to work perfectly. At least, everything except one thing:

In my ThingHTTP body there are custom replacement key which get replaced by the passed in values:

labels=ThingHTTP,%%labels%%&title=%%title%%&description=%%description%%

 

Unfortunately, as soon as one of the replacement values contain special characters, such as & or +, things are going weird.

How may I tell ThingHTTP to escape the custom replacement keys before sending them along in a POST request?

Avatar
Hans
Natick, MA

Forum Posts: 390
sp_UserOfflineSmall Offline
2
November 1, 2016 - 10:19 am
sp_Permalink sp_Print

Have you tried URL encoding ? There are websites that will do the encoding for you. Let us know if you try that. 

Avatar
mandelkind
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
3
November 1, 2016 - 3:52 pm
sp_Permalink sp_Print

@Hans: I'm unable to add any additional encoding, since the data is passed by a 3rd party service (IFTTT) - and there is the data already urlEncoded. I suspect ThingHTTP receives the data & urlDecodes it, before sending it along.

So the only solution I can see is that ThingHTTP should ensure it can be passed without any issues. 

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

epicpaymentsny

DanielBobby

mercedeszw18

ujuxoketate

olihfez

winnieeq69

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee