Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Referer in HTTP request in QML



  • From what I understand, in QML the only way I have to access the network is via the XMLHttpRequest object.

    I also know that for security reasons, JavaScript prohibits setting the Referer header via the setRequestHeader method.

    However, since we are not working inside a browser, I thought that setting the Referer header in QML would work. Turns out it doesn't.

    • Can I make an HTTP request in QML and set the Referer?
    • What are my options if any?
      (native C++ code is out of the question)

    Thank you.


Log in to reply