Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var xhr = new XMLHttpRequest();
  2.  
  3. xhr.onload = function () {
  4.  
  5. if (xhr.status >= 200 && xhr.status < 300) {
  6. console.log(xhr.responseText);
  7. } else {
  8. console.log(xhr.responseText);
  9. }
  10.  
  11. };
  12.  
  13.  
  14. xhr.open('POST', 'http://staging-blackbox.bornfight.com/core/quest/behaviour/solution');
  15. xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  16. xhr.send(JSON.stringify({'solution': 'admin'}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement