Skip to content

Instantly share code, notes, and snippets.

@Troush
Created December 2, 2015 12:13
Show Gist options
  • Save Troush/6247f3cda27a42144c24 to your computer and use it in GitHub Desktop.
Save Troush/6247f3cda27a42144c24 to your computer and use it in GitHub Desktop.
$.ajax({
url: "http://en.wikipedia.org/w/api.php?action=query&format=json&callback=test&prop=langlinks&lllimit=500&titles=kaas",
// The name of the callback parameter, as specified by the YQL service
jsonp: "callback",
// Tell jQuery we're expecting JSONP
dataType: "jsonp",
// Tell YQL what we want and that we want JSON
data: {
q: "select title,abstract,url from search.news where query=\"cat\"",
format: "json"
},
// Work with the response
success: function( response ) {
console.log( response ); // server response
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment