-
-
Save handleman/f25d8b2fd861dbb16356 to your computer and use it in GitHub Desktop.
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
/** Global override to make all AJAX calls as POST type */ | |
Backbone.ajax = function() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
return Backbone.$.ajax.apply(Backbone.$, _.extend(args, {type: 'POST'})); | |
}; | |
/** Manual override per call */ | |
Collection.fetch({data: {id: 34}, type: 'POST'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment