Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to remove the Authorization header from a http request
Forum Updated to NodeBB v4.3 + New Features

How to remove the Authorization header from a http request

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 736 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tusharh
    wrote on 5 Nov 2015, 11:38 last edited by
    #1

    I want to remove the 'Authorization: ' header from my GET request fired. QT by default adds it.

    Sample of request fired -
    GET https://mywebsiteurl.com/remote.php/webdav/3.txt HTTP/1.1

    Authorization: Basic Og==
    User-Agent: Mozilla/5.0 (Linux) myapp/1.2.1
    Connection: Keep-Alive
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,*

    I don't want the Authorization header. I completely want to remove it from my request fired.
    End result should be as below-

    GET https://mywebsiteurl.com/remote.php/webdav/3.txt HTTP/1.1
    User-Agent: Mozilla/5.0 (Linux) myapp/1.2.1
    Connection: Keep-Alive
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,*

    I have written sample code -

    QNetworkAccessManager* mgr = new QNetworkAccessManager();
    ....
    QNetworkRequest req;
    req.setUrl(QUrl("sampleURL") );
    mgr->get(req);
    .....
    Thanks in advance..!!

    1 Reply Last reply
    0

    1/1

    5 Nov 2015, 11:38

    • Login

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