Giuseppe is right, you do not need to use the libcurl, curlpp libraries and similar libraries. This is not necessary; Qt has a simple and working class.
Keep in mind that the standard way to send a request and receive a response is asynchronous. You always need to connect the processed manager (QNetworkReply *) to the slot.
If you send multiple requests and do not want to add a slot for each response, you can always start the event loop and connect the managers signal to the quit () slot of the event loop.
Something like that:
QNetworkAccessManager *manager = new QNetworkAccessManager(this); QEventLoop *eventLoop = new QEventLoop(); QObject::connect(manager, SIGNAL(finished(QNetworkReply*)), eventLoop, SLOT(quit()); manager->get(QNetworkRequest(QUrl("http://stackoverflow.com"))); eventLoop->exec(QEventLoop::ExcludeUserInputEvents); QByteArray replyData = reply->readAll(); ...
Btw. I donβt know what you are doing. But if this is a mobile application, I would recommend you switch from VS to QtCreator IDE. It has a good simulator and a complete toolchain for testing mobile devices.
source share