Skip to content

Instantly share code, notes, and snippets.

@darkwing
Created June 18, 2009 20:44
Show Gist options
  • Save darkwing/132178 to your computer and use it in GitHub Desktop.
Save darkwing/132178 to your computer and use it in GitHub Desktop.
['get', 'post', 'put', 'delete'].each(function(method){
methods[method] = methods[method.toUpperCase()] = function(){
var params = Array.link(arguments, {url: String.type, data: $defined});
return this.send($extend(params, {method: method}));
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment