XmlHttpRequest inappropriately modifies Content-type request header value by itself
I am trying to upload a file to Dropbox using XmlHttpRequest, in a QML application. I am getting the following error:
Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "application/octet-stream;charset=UTF-8". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".
I seems that no matter which value I set to the Content-Type request header, it always adds
to the end.
As data, I am only using a string, as I am simply trying to make things work first:
request.send("Example text abcdefg")
How to deal with this issue?