PDA

View Full Version : QHttp Request with "#" in path



ct
1st November 2009, 19:12
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:


QHttpRequestHeader header("GET","/wiki/HTML#History_of_HTML");
header.setContentType("application/x-www-form-urlencoded");
header.setValue("Host", "en.wikipedia.org");

httpGetID = http->request(header);


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.

mgoetz
2nd November 2009, 12:57
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.