Created
August 15, 2011 16:13
-
-
Save bruno-c/1147085 to your computer and use it in GitHub Desktop.
jQuery.putJSON - Y U NO LIKE PUT REQUESTS
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
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