Skip to content

Instantly share code, notes, and snippets.

@kemalelmizan
Last active January 13, 2021 02:49
Show Gist options
  • Save kemalelmizan/f23c7a0408a04d80633e6a6754dbd06c to your computer and use it in GitHub Desktop.
Save kemalelmizan/f23c7a0408a04d80633e6a6754dbd06c to your computer and use it in GitHub Desktop.
CORS Test
x = new XMLHttpRequest()
x.onerror = (e) => console.log(e, x)
x.open('GET', 'https://jsonplaceholder.typicode.com/todos/1')
x.setRequestHeader('Accept', 'application/json')
x.send()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment