Skip to content

Instantly share code, notes, and snippets.

@bruno-c
Created August 15, 2011 16:13
Show Gist options
  • Save bruno-c/1147085 to your computer and use it in GitHub Desktop.
Save bruno-c/1147085 to your computer and use it in GitHub Desktop.
jQuery.putJSON - Y U NO LIKE PUT REQUESTS
jQuery.extend({
putJSON: function( url, data, callback ){
return $.ajax({
type: 'put',
url: url,
processData: false,
data: data,
success: callback,
contentType: 'application/json',
dataType: 'json'
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment