Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. XmlHttpRequest inappropriately modifies Content-type request header value by itself
Forum Updated to NodeBB v4.3 + New Features

XmlHttpRequest inappropriately modifies Content-type request header value by itself

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 542 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Archie888
    wrote on last edited by Archie888
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved