Results 1 to 3 of 3

Thread: Difference between QHttp::get and QHttp.request

  1. #1
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Difference between QHttp::get and QHttp.request

    first:
    Qt Code:
    1. QString Username("Test");
    2. QString AuthValue("Test1");
    3. Header.setRequest("GET", "/data/feed/api/user/" + Username + "?kind=album");
    4. Header.setValue("Authorization", "GoogleLogin auth=" + AuthValue);
    5.  
    6. QBuffer AlbumsXml;
    7.  
    8. http->setHost("picasaweb.google.com");
    9. httpGetAlbumsId = http->request( Header, "", &AlbumsXml);
    To copy to clipboard, switch view to plain text mode 
    second:
    Qt Code:
    1. http->setHost("picasaweb.google.com");
    2. http->get("/data/feed/api/user/" + Username + "?kind=album", &AlbumsXml);
    To copy to clipboard, switch view to plain text mode 

    these two snippets have difference, i can't find what!
    help me please.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Difference between QHttp::get and QHttp.request

    get() adds more headers than you did manually. Take a look at actual headers using some network sniffer or by printing the request header when it's available.

  3. The following user says thank you to wysota for this useful post:

    LMZ (6th September 2007)

  4. #3
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Difference between QHttp::get and QHttp.request

    yeap! you were right!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.