Skip to content

Instantly share code, notes, and snippets.

@abachuk
Created May 27, 2013 19:41
Show Gist options
  • Save abachuk/5658751 to your computer and use it in GitHub Desktop.
Save abachuk/5658751 to your computer and use it in GitHub Desktop.
getting blog posts with ajax request in JSON format
blog: function(){
$.ajax({
url: 'http://alexbachuk.com/api/get_recent_posts/',
type: 'GET',
dataType: 'json',
success: function(data){
console.log(data);
},
error: function(data){
console.log(data);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment