Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8544501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:34:27+00:00 2026-06-11T12:34:27+00:00

How can FireFox be forced to use a specific content type for XMLHttpRequest without

  • 0

How can FireFox be forced to use a specific content type for XMLHttpRequest without appending the charset parameter after the type itself?

I am using FireFox 15 to extract some data out of a very custom http server. The server takes JSON from the POST body and responds with another JSON. The server accepts only “Content-Type: application/json” as valid content type. Anything after except this exact header will not be recognized by the server as valid content type.

When I use the below code in Chrome it sets the content type as expected “Content-Type: application/json”

var invocation = new XMLHttpRequest();
invocation.open('POST', url, true);
invocation.setRequestHeader('Content-Type', 'application/json');
invocation.onreadystatechange = function(data){ /* some processing */ };
invocation.send(body);

The issue is that FireFox sets the content type to “Content-Type: application/json; charset=UTF-8”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:34:28+00:00Added an answer on June 11, 2026 at 12:34 pm

    According to bugzilla using sendAsBinary is a possible workaround.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can use FireFox and FireBug, in a pane, I can open a .css
Is there any way I can make Firefox call a JavaScript function in my
I know, that I can write firefox.exe in registry command, but when I write
Try to download this page: http://www.4shared.com/get/B4AgMkcw/cookies.html I can use wget/firefox to get the whole
Can one place an arbitrary program (firefox, openoffice, etc...) in a QX11EmbedContainer? The fllowing
In Firefox, we can customize the default values for HTTP headers, let's say for
Can someone tell me please why the following example work in Firefox but not
Can't seem to get my font working in firefox, seems to work fine in
Can you help me to list browsers from this file http://techpatterns.com/downloads/firefox/useragentswitcher.xml into txt file,
Is there any firefox addon which can display my asp.net page viewstate size.... Any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.