I need to interface a TTS service. Input for TTS is sent via POST requests.
The message needs to include country-specific characters in Unicode.
On this flow:
[{"id":"f133ea37.e26a98","type":"http request","z":"7e633afb.9123fc","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.109:8122/text_to_speech","tls":"","persist":false,"proxy":"","authType":"","x":658.1666259765625,"y":51.66664123535156,"wires":[[]]},{"id":"844ffbc7.7b1","type":"change","z":"7e633afb.9123fc","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"\"Content-Type: application/json\"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":417.833251953125,"y":134.66664123535156,"wires":[["805da16c.9f729"]]},{"id":"805da16c.9f729","type":"exec","z":"7e633afb.9123fc","command":"curl -v --header \"Content-Type: application/json\" --request POST --data '{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}' http://192.168.1.109:8122/text_to_speech","addpay":false,"append":"","useSpawn":"false","timer":"5","oldrc":false,"name":"","x":1128,"y":135.5,"wires":[[],[],[]]},{"id":"8393ef30.8e7388","type":"inject","z":"7e633afb.9123fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":199,"wires":[["844ffbc7.7b1"]]},{"id":"4b3bc9a6.c668e8","type":"change","z":"7e633afb.9123fc","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"\"Content-Type: application/json\"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":428,"y":51,"wires":[["f133ea37.e26a98"]]},{"id":"9ffb9ed2.1a6538","type":"inject","z":"7e633afb.9123fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":238,"y":52,"wires":[["4b3bc9a6.c668e8"]]}]
when I try to use HTTP request and set msg.payload to be a JSON object, Unicode is converted to UTF-8 and TTS service does not recognize country specific characters.
When i set msg.payload to be a string, HTTP request node does not work.
Exec node with curl works. Is it possible to make it work with HTTP Request?