The part of the URL following the '?' onward is the query string and is one way of passing parameters to a web page generating script.
The demo program is deliberately ignoring that portion in the code:
void HttpWindow::downloadFile()
{
...
QByteArray path
= QUrl::toPercentEncoding(url.
path(),
"!$&'()*+,;=:@/");
if (path.isEmpty())
path = "/";
httpGetId = http->get(path, file);
...
}
void HttpWindow::downloadFile()
{
...
QByteArray path = QUrl::toPercentEncoding(url.path(), "!$&'()*+,;=:@/");
if (path.isEmpty())
path = "/";
httpGetId = http->get(path, file);
...
}
To copy to clipboard, switch view to plain text mode
It uses only the path component of the URL rather than the whole URL. Have a look at the docs for QUrl for more about the components of the URL and how to access them.
Bookmarks