Created
May 8, 2012 01:37
-
-
Save ralphcrisostomo/2631889 to your computer and use it in GitHub Desktop.
backbone fetch supports Jquery.ajax parameters
This file contains hidden or 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
// 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