This code has always worked:
Summary
[{"id":"2305c42f.da47a4","type":"http request","z":"37a4cfd0.689588","name":"TEST DOOR","method":"POST","ret":"txt","url":"http://192.168.1.2:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=\"QERFWrtrg4t5\"&payload={\"text\": \"кирилица\"}","tls":"","x":430,"y":180,"wires":[["c0fe87d3.f0429"]]},{"id":"c0fe87d3.f0429","type":"debug","z":"37a4cfd0.689588","name":"Door Sensor Status","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":660,"y":180,"wires":[]},{"id":"871407db.981758","type":"inject","z":"37a4cfd0.689588","name":"","topic":"","payload":"true","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":180,"wires":[["2305c42f.da47a4"]]}]
I'm sending webhook url to http request Node
http://192.168.1.2:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token="QERFWrtrg4t5"&payload={"text": "кирилица"}
And it always worked.
Recently it stopped working, if the message contains at least one Cyrillic character.
Log
|node-red.0|2019-01-27 22:12:01.260|error|at processImmediate [as _immediateCallback] (timers.js:745:5)|
|---|---|---|---|
|node-red.0|2019-01-27 22:12:01.260|error|at tryOnImmediate (timers.js:768:5)|
|node-red.0|2019-01-27 22:12:01.260|error|at runCallback (timers.js:810:20)|
|node-red.0|2019-01-27 22:12:01.260|error|at Immediate.<anonymous> (/opt/iobroker/node_modules/request/request.js:578:7)|
|node-red.0|2019-01-27 22:12:01.260|error|at end (/opt/iobroker/node_modules/request/request.js:549:18)|
|node-red.0|2019-01-27 22:12:01.260|error|at Request.write (/opt/iobroker/node_modules/request/request.js:1497:10)|
|node-red.0|2019-01-27 22:12:01.260|error|at Request.start (/opt/iobroker/node_modules/request/request.js:751:32)|
|node-red.0|2019-01-27 22:12:01.260|error|at Object.request (http.js:39:10)|
|node-red.0|2019-01-27 22:12:01.260|error|at new ClientRequest (_http_client.js:137:13)|
|node-red.0|2019-01-27 22:12:01.260|error|27 Jan 22:12:01 - [error] [http request:TEST DOOR] TypeError: Request path contains unescaped characters|
Debug messages
msg : error
"TypeError: Request path contains unescaped characters"
msg.payload : string[247]
"TypeError: Request path contains unescaped characters : http://192.168.1.2:5000/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token="QERFWrtrg4t5"&payload={"text": "кирилица"}"
If you remove the Cyrillic alphabet "кирилица"
and insert any Latin characters, eg "123QWERty"
, then everything works successfully.
Why stopped working with Cyrillic?