MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / post

Method post

launcher/minecraft/auth/AuthRequest.cpp:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void AuthRequest::post(const QNetworkRequest &req, const QByteArray &data, int timeout/* = 60*1000*/) {
68 setup(req, QNetworkAccessManager::PostOperation);
69 data_ = data;
70 status_ = Requesting;
71 reply_ = APPLICATION->network()->post(request_, data_);
72 timedReplies_.add(new Katabasis::Reply(reply_, timeout));
73#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
74 connect(reply_, SIGNAL(errorOccurred(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError)));
75#else
76 connect(reply_, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError)));
77#endif
78 connect(reply_, SIGNAL(finished()), this, SLOT(onRequestFinished()));
79 connect(reply_, &QNetworkReply::sslErrors, this, &AuthRequest::onSslErrors);
80 connect(reply_, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(onUploadProgress(qint64,qint64)));
81}
82
83void AuthRequest::onRequestFinished() {
84 if (status_ == Idle) {

Callers 13

onPollTimeoutMethod · 0.80
loginMethod · 0.80
refreshMethod · 0.80
executeTaskMethod · 0.80
executeTaskMethod · 0.80
executeTaskMethod · 0.80
executeTaskMethod · 0.80
setupProfileMethod · 0.80
sendRequestMethod · 0.80
performMethod · 0.80
performMethod · 0.80
performMethod · 0.80

Calls 2

networkMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected