Last active
May 2, 2019 07:19
-
-
Save mtinra/7c9a8abf8d67960da39d62de67a5c09b to your computer and use it in GitHub Desktop.
XMLHttpRequest for CORS
This file contains hidden or 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
<script> | |
const request = new XMLHttpRequest(); | |
const url = 'https://www.google.co.th/'; | |
function CORSTesting() { | |
if(request) { | |
request.open('GET', url, true); | |
request.send(); | |
} | |
} | |
CORSTesting(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment