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

Getting a relative URL from QNetworkReply Location header



  • @
    QUrl location(reply->header(QNetworkRequest::LocationHeader).toString());
    @
    For this response:
    @
    Location: /relative/path/?test=hello
    @
    returns an invalid URL. Already reply->header(QNetworkRequest::LocationHeader) returns Invalid. Why is that? How can I get a relative URL from the Location header?


Log in to reply