void OAuthPrivate::accessToken(const QString & url, const QString & verifier){ QNetworkRequest request = buildRequest("POST", url, buildAuthHeader("POST", url, Params(), verifier)).first; request.setAttribute(QNetworkRequest::User, AccessToken); QNetworkReply * reply = nam->post(request, QByteArray()); reply->setSslConfiguration(* config); connect(reply, SIGNAL(finished()), SLOT(reply())); }
QNetworkReply* ZnsHelper::postRequest(const qint32& reqType, const QByteArray& data) { m_reqHandler->setRawHeader("Content-Type", ngrt4n::toByteArray(ContentTypes[reqType])); QNetworkReply* response = QNetworkAccessManager::post(*m_reqHandler, data); response->setSslConfiguration(m_sslConfig); connect(response, SIGNAL(finished()), m_evlHandler, SLOT(quit())); connect(response, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(processError(QNetworkReply::NetworkError))); m_evlHandler->exec(); return response; }
void QNetworkReplyProto::setSslConfiguration(const QSslConfiguration &config) { QNetworkReply *item = qscriptvalue_cast<QNetworkReply*>(thisObject()); if (item) item->setSslConfiguration(config); }