Hi,
I'm using an api to send messages but the problem is that when I insert an emoji in the body I get a 400 Bad request back here is my js code :
var jsonData = {
"type": "text",
"text": "body": "hello how are you ",
token = "xxxxxxxxxxx",
contentType = "application/json";
var req = new HttpClientRequest('https://exampleTestEndpoint.com/sendMessage/128192');
req.header["Authorization"] = token;
req.header["Content-Type"] = contentType;
req.method = "POST";
var data = jsonData;
req.body = JSON.stringify(data);
req.execute();
var resp = req.response;
var code = resp.code;
var body = JSON.parse(resp.body);
Then when I remove the emoji everything works normally, I tried with another api from another service and I had the same problem when I insert an emoji,
I also tried with the utf-8 code of the emoji but it still doesn't work.
Thank you in advance for your help!