Guest User

Untitled

a guest
Jul 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(uri == '/json/executeCode') {
  2.     console.log(request.method);
  3.     console.log(request.body);
  4. }
  5.  
  6. $.ajax('/json/executeCode', {
  7.                         type: 'POST',
  8.                         data: JSON.stringify("lol"),
  9.                         contentType: 'text/json',
  10.                         success: function() { alert("success"); },
  11.                         error  : function() { alert("failure!"); }
  12.                     });
  13.  
  14.  
  15.  
  16. NodeJS:
  17. POST
  18. undefined
  19.  
  20. Client:
  21. alert("failure!");
Add Comment
Please, Sign In to add comment