首页 > 代码库 > qt QNetworkAccessManager https
qt QNetworkAccessManager https
QString para = QString("?mac=%1&bd=%2&uid=%3&frpoc=%4").arg(gMac).arg(gBarid).arg(gUid).arg(nowProcName);
QUrl url(QString("%1%2").arg(chkPopupAdUrl).arg(para));
QByteArray byte_array;
QNetworkAccessManager manager;
QEventLoop loop;
QNetworkRequest request;
QSslConfiguration config;
config.setPeerVerifyMode(QSslSocket::VerifyNone);
config.setProtocol(QSsl::SslV3);
request.setSslConfiguration(config);
request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
request.setUrl(url);
QNetworkReply *reply = manager.get(request);
reply->ignoreSslErrors();
QObject::connect(reply,SIGNAL(finished()),&loop,SLOT(quit()));
loop.exec();
byte_array = reply->readAll();
QString popstr = byte_array;
qt QNetworkAccessManager https
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。