Skip to content

Instantly share code, notes, and snippets.

@vickonrails
Last active October 30, 2017 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vickonrails/cc735213aeeb968c91b1f9234105343e to your computer and use it in GitHub Desktop.
Save vickonrails/cc735213aeeb968c91b1f9234105343e to your computer and use it in GitHub Desktop.
var ajaxRequest = new XMLHttpRequest();
ajaxRequest.onreadystatechange = handleRequest;
ajaxRequest.open('GET','https://api.unsplash.com/photos/?client_id=b14e32fb4fef48a669291db40c3cbb7797701501d9a453c3da8fcf5df3c77470', true);
ajaxRequest.send();
function handleRequest(data){
console.log(data.responseText);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment