Skip to content

Instantly share code, notes, and snippets.

@kedarmhaswade
Created April 7, 2015 01:21
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 kedarmhaswade/b67f638829984eb1b952 to your computer and use it in GitHub Desktop.
Save kedarmhaswade/b67f638829984eb1b952 to your computer and use it in GitHub Desktop.
demo of jsonp with github api
<html>
<head>
<script type="text/javascript">
function foo(response) {
var meta = response.meta;
var data = response.data;
console.log(meta);
console.log(data);
}
//var script = document.createElement('script');
//script.src = 'https://api.github.com?callback=foo';
//document.getElementsByTagName('head')[0].appendChild(script);
</script>
<script src="https://api.github.com?callback=foo">
</script>
</head>
<body>
<p>More ... Open up your browser's console.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment