Created
March 31, 2016 12:53
-
-
Save drakemccabe/1828cf3a224bf9174492053afdb09046 to your computer and use it in GitHub Desktop.
HTML page with script to test JSONP request.
This file contains 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 src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> | |
<script> | |
var requestUrl = ""; | |
window.onload = function() { | |
$.getJSON(requestUrl, {}, function (data) { | |
document.write(JSON.stringify(data)); | |
console.log(data); | |
}).error( | |
function(jqXHR, statusText, errorThrown) { | |
alert(jqXHR.status); | |
alert(errorThrown); | |
} | |
); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment