Guest User

Untitled

a guest
Nov 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. var url = "http://dev/api/v1/macc/*";
  2. var xhttp = new XMLHttpRequest();
  3. xhttp.onreadystatechange = function () {
  4. if (this.readyState == 4 && this.status == 200) {
  5. console.log(xhttp.responseText);
  6. }
  7. };
  8. xhttp.open("GET", url, true);
  9. // xhttp.setRequestHeader('Content-Type', 'application/json');
  10. xhttp.setRequestHeader('X-CSRF-Token', 'xxxxxxxxxxxxxxxxx');
  11. // xhttp.setRequestHeader('cookie', cookie);
  12.  
  13. xhttp.send();
Add Comment
Please, Sign In to add comment