Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <html>
  2. <body>
  3. <script>
  4. var connection = new WebSocket('ws://127.0.0.1:8090');
  5.  
  6. connection.onopen = function () {
  7. console.log('Connection opened');
  8.  
  9. var object = {
  10. action: 'AUTH',
  11. data: {
  12. id: "12",
  13. type: "USER",
  14. deviceToken: "asdasdasdasdasdasd\\ asdasdasd"
  15. }
  16. };
  17.  
  18. console.log(JSON.stringify(object));
  19.  
  20. connection.send("asdasdasdasd");
  21. };
  22.  
  23. connection.onclose = function () {
  24. console.log('Connection closed');
  25. };
  26. </script>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement