[Qt-interest] QNetworkReply *reply = networkManager->get(request); can't get the response in the reply
Meir Yanovich
meiry242 at gmail.com
Fri Apr 16 16:08:23 CEST 2010
Hello all
i have this simple http request and im trying to get the response in the
reply variable but i can't and i dont know why
here is what i have :
in the constructor i init the manager and the signal slot
:
HttpClient::HttpClient()
{
m_networkManager = new QNetworkAccessManager(this);
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(finishedSlot(QNetworkReply*)));
}
then in one of the HttpClient methods i do the get request
QNetworkRequest request;
request.setUrl(url);
QString& ApiResponse
QEventLoop loop;
QNetworkReply *reply = networkManager->get(request);
QByteArray data=reply->readAll();
ApiResponse.append(data);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100416/83c890ed/attachment.html
More information about the Qt-interest-old
mailing list