XmlHttpRequest inappropriately modifies Content-type request header value by itself



  • Hi,

    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

    ;charset=UTF-8
    

    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?

    Cheers,
    -A888


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.