Skip to content

Instantly share code, notes, and snippets.

@exiva
Last active August 29, 2015 14:22
Show Gist options
  • Save exiva/682cd3e77c0f0788bf4a to your computer and use it in GitHub Desktop.
Save exiva/682cd3e77c0f0788bf4a to your computer and use it in GitHub Desktop.
var body = {message: 'Hello "\u2764\uFE0F" one two three four'};
bodyjson = JSON.stringify(body);
request.open('POST', "http://192.168.1.30:5000/", true);
request.setRequestHeader('Content-Type', 'application/json');
request.send(bodyjson);
//iOS Sends:
//{"message":"Hello \"❤️\" one two three fo
//Android Sends:
//{"message":"Hello \"❤️\" one two three four"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment