Simple JavaScript requests

GET request with correct CORS setup


JavaScript code can make a cross-origin GET request. The response must include the correctly configured Access-Control-Allow-Origin header.


  1. Hit green button below and see successful response returned
  2. Observe difference between source and request origins, confirming cross-origin request
View source on GitHub | Created by Tom Gregory