QNetworkAccessManager and QHttp doesn't sends anything
Hi everyone,
i wrote some app and trying with a help of QNetworkAccessManager send some data to server using POST request, however nothing happen at all. I tried to use QHttp and the same result. I have checked it with WireShark - none requests in the list from my program. I tried to send GET request and the same - none requests. I created project with Network libs, got example from help:
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(requesReply(QNetworkReply*)));
QNetworkRequest req;
req.setUrl(QUrl("http://server.net/upload"));
manager->get(req);
Please help me to find what i'm missing.
Thanks in advance
Re: QNetworkAccessManager and QHttp doesn't sends anything
Did you test to see if there was an error ?
Code:
void YourClass::requesReply(QNetworkReply* reply)
{
reply->deleteLater();
if (reply->error() != QNetworkReply::NoError)
{
QMessageBox::critical(0,
"NetworkError", reply
->errorString
());
return;
}
...
}
Re: QNetworkAccessManager and QHttp doesn't sends anything
"Server.net" does not have an address record?