PDA

View Full Version : Content type being set to application www-form-urlencoded in IE



ameetp
25 Apr 2010, 8:09 AM
I have set the content type on Ajax.request to 'application/json'. IE still adds application www-form-urlencoded.
Firefox behaves correctly and sets the content type to 'application/json' .
IE on the other hand sets it to
Content-Type: application/x-www-form-urlencoded, application/json
Any pointers greatly appreciated.




Ext.Ajax.request( {
url : _url,

method : 'POST',
headers:{
'Content-Type': 'application/json'

}, ...



P.S I had made a similar post yesterday but cant find it so reposting .

ameetp
26 Apr 2010, 10:17 AM
This looks like a bug(?) in extjs 3.2.0 . I was able to set 'Content-Type' :'application/json' using the XMLHttpRequest object of IE directly and it works fine.