Content-Type in AJAX Post Call in FireFox

10 pts.
Tags:
Firefox 11
Windows 7
Hi,

In fire fox browser how to send Content-type as 'application/json' in ajax call. For IE I am using below code, it is working fine but failed in FireFox. By default FF taking text/html as  mime type.

Please help me in this regard.

dojo.xhrPost({     url: URL,     data: jsonObj,     handleAs: 'json',  headers: { "Content-Type": "application/json", "Accept": "application/json"},     load: function(data,status) {   //alert(dojo.toJson(data));   handle_data(data);  },     error: function(error,status) {   alert(error.message);  } });

FYI, am using windows 7 and FF 11.0 version;

Thanks,

Kumar



Software/Hardware used:
Windows7 and FireFox 11
ASKED: April 13, 2012  7:06 AM
UPDATED: April 13, 2012  12:22 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following