Open oriefrati opened 9 years ago
I had the same problem. Try the following.
index.js line 100:
var jsonString = JSON.stringify(json_request);
change to:
var jsonString = JSON.stringify(json_request).replace(/[\u0080-\uFFFF]/g, function(m) { return "\\u" + ("0000" + m.charCodeAt(0).toString(16)).slice(-4); });
Works for me.
Source: https://community.pushwoosh.com/questions/1011/status-400-bad-request-when-sending-special-symbols
I'm using sails js and when i send push message in hebrew i get the following errors:
undefined:0
^ SyntaxError: Unexpected end of input at Object.parse (native) at IncomingMessage. (XXX/node_modules/pushwoosh/index.js:123:31)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:492:13)