jQuery and postJSON

The last few days I’ve been using jQuery to write some REST based javascript and HTML. While I was doing that I needed a function that looked like getJSON, that did a POST instead of a GET. The difference is that I send a bit of JSON and receive a bit of JSON, instead of sending form-like data. So I created the following bit of code: $.postJSON = function (url, data, callback) { $....

September 5, 2008