67 EmptyResponseIsValid = 1 << 0,
123 ErrorCode post( QNetworkRequest &request, QIODevice *data,
bool forceRefresh = false,
QgsFeedback *feedback =
nullptr );
130 ErrorCode post( QNetworkRequest &request, const QByteArray &data,
bool forceRefresh = false,
QgsFeedback *feedback =
nullptr );
152 ErrorCode head( QNetworkRequest &request,
bool forceRefresh = false,
QgsFeedback *feedback =
nullptr );
179 ErrorCode put( QNetworkRequest &request, const QByteArray &data,
QgsFeedback *feedback =
nullptr );
203 QString errorMessage()
const {
return mErrorMessage; }
214 QString authCfg()
const;
220 void setAuthCfg(
const QString &authCfg );
246 void uploadProgress( qint64 bytesReceived, qint64 bytesTotal );
254 void replyProgress( qint64, qint64 );
255 void replyFinished();
256 void requestTimedOut( QNetworkReply *reply );
270 QNetworkReply *mReply =
nullptr;
272 Method mMethod = Get;
275 QIODevice *mPayloadData;
281 QString mErrorMessage;
284 ErrorCode mErrorCode = NoError;
289 bool mIsAborted =
false;
292 bool mForceRefresh =
false;
295 bool mTimedout =
false;
298 bool mGotNonEmptyResponse =
false;
301 RequestFlags mRequestFlags;
303 int mExpirationSec = 30;
305 QPointer< QgsFeedback > mFeedback;
307 ErrorCode doRequest( Method method, QNetworkRequest &request,
bool forceRefresh,
QgsFeedback *feedback =
nullptr, RequestFlags requestFlags = RequestFlags() );
309 QString errorMessageFailedAuth();
311 void sendRequestToNetworkAccessManager(
const QNetworkRequest &request );
313 void abortIfNotPartialContentReturned();
Encapsulates a network reply within a container which is inexpensive to copy and safe to pass between...