Results 1 to 2 of 2

Thread: QHttp Request with "#" in path

  1. #1
    Join Date
    Feb 2006
    Posts
    91
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QHttp Request with "#" in path

    I am trying to "GET" a url with "#" in the path, but I get a page not found 404. What is the correct way to "GET","POST" url with "#" in it ? I am using QHttp::request to send in the full header.

    Example:
    Qt Code:
    1. QHttpRequestHeader header("GET","/wiki/HTML#History_of_HTML");
    2. header.setContentType("application/x-www-form-urlencoded");
    3. header.setValue("Host", "en.wikipedia.org");
    4.  
    5. httpGetID = http->request(header);
    To copy to clipboard, switch view to plain text mode 

    What is the right way to get this sort of pages if we can ? I have to POST to some url which has the form "/path/to/submit#null", any help to accomplish this would be much appreciated.
    Humans make mistake because there is really NO patch for HUMAN STUPIDITY

  2. #2
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QHttp Request with "#" in path

    As far as I know, the fragment part after the # is only for inside the browser, not for requesting. But check the RFC regarding that.

    How are your results with QNetworkAccessManager? QHttp is deprecated, replacing it with QNAM should be fairly easy.
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

Similar Threads

  1. QHttp request
    By nimsnx in forum Qt Programming
    Replies: 1
    Last Post: 2nd July 2009, 20:54
  2. QHttp request failed
    By xgoan in forum Qt Programming
    Replies: 1
    Last Post: 19th November 2008, 16:47
  3. Replies: 1
    Last Post: 9th September 2008, 00:10
  4. QHTTP get request
    By s410i in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2008, 17:35
  5. Trouble sending request with QHttp
    By WinchellChung in forum Newbie
    Replies: 2
    Last Post: 27th June 2007, 18:50

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
  •  
Qt is a trademark of The Qt Company.