On 07/02/07, TeeCee <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I would like to know if I can do a JSON request with POST and not GET?
> According to the documentation of $.getJSON( url, params, callback ):
> "Load JSON data using an HTTP GET request." so it is only GET.
> But I can do a $.post(), so I expect it to be available if not now, than
> maybe in the near future...?
>
> Thanks, BYE:
> TeeCee :o)
Try this (untested):
jQuery.extend({
postJSON: function( url, data, callback ) {
return jQuery.post(url, data, callback, "json");
}
});
then just call postJSON rather than getJSON.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/