Skip to content

Instantly share code, notes, and snippets.

@ralphcrisostomo
Created May 8, 2012 01:37
Show Gist options
  • Save ralphcrisostomo/2631889 to your computer and use it in GitHub Desktop.
Save ralphcrisostomo/2631889 to your computer and use it in GitHub Desktop.
backbone fetch supports Jquery.ajax parameters
// Sample Code
// backbone fetch supports Jquery.ajax parameters
Model.fetch( {
data: {api_key: 'secretkey'},
type: 'POST',
success: function(model, response) {
console.log('SUCCESS:');
console.log(response);
},
error: function(model, response) {
console.log('FAIL:');
console.log(response);
}}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment