Last active
July 2, 2016 02:55
-
-
Save mariohmol/29d90efd35b947de8f6df79600ea6b24 to your computer and use it in GitHub Desktop.
How to consume Coursera API using jquery - example with courses and jsonp workaround
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
<html><body> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$.ajax({ | |
type: "GET", | |
url: "http://cors.io/", | |
data: { | |
u: "https://api.coursera.org/api/courses.v1?q=search&query=Philosophy" | |
} | |
}).done(function(d){console.log(d)}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment