Hello,
Fairly basic question, how can I escape a string so that a white space is accepted inside a string?
When the stlVal is "Geen vraag" I get a 400 Reason: Bad Request, offcourse I can change it to "Geen_vraag" to get it working.
def Domoticz(strIdx, strVal, strDesc = '', strWP_ID = ''):
strJson='/json.htm?type=command¶m=udevice&idx='+strIdx+'&svalue='+strVal
JSON update status with space / bad request Topic is solved
Moderators: leecollings, remb0
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: JSON update status with space / bad request
You should convert strings to urlencoded string. A space will translate to %20.
Jos
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Who is online
Users browsing this forum: Bing [Bot] and 1 guest