A Pen by ideasatrandom on CodePen.
Last active
August 29, 2015 14:10
-
-
Save ideasatrandom/937da9a7247ac69b314f to your computer and use it in GitHub Desktop.
reqr.es JSON api - Test
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
<h1>reqr.es JSON api - Example</h1> | |
<p>Check the developer console for the returned JSON Response</p> |
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
// Trying out reqr.es JSON api | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "http://reqr.es/api/testentry/4", true); | |
xhr.onload = function(){ | |
console.log(xhr.responseText); | |
} | |
xhr.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment