[jQuery] Patch: Set Content-Type of an AJAX request

[jQuery] Patch: Set Content-Type of an AJAX request

Hi,
I'd like to suggest an additional option for $.ajax()
to allow an alternative Content-Type, eg: application/json
I'd like to send raw JSON data to a PHP script, but PHP
requires that a Content-Type other than the usual
'application/x-www-form-urlencoded'
is set before it allows you to access the raw request data
(via $HTTP_RAW_POST_DATA).
This will also allow the correct submission of XML, and other formats.
I've attached a patch against ajax.js
Cheers
- Mark Gibson
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/