void fetched()
Emitted when the network content has been fetched, regardless of whether the fetch was successful or ...
QNetworkReply * reply()
Returns the network reply.
Handles HTTP network content fetching in a background task.
void cancel() override
Notifies the task that it should terminate.
void errorOccurred(QNetworkReply::NetworkError code, const QString &errorMsg)
Emitted when an error with code error occurred while processing the request errorMsg is a textual des...
HTTP network content fetcher. A simple method for fetching remote HTTP content and converting the con...
void fetchContent(const QUrl &url, const QString &authcfg=QString())
Fetches content from a remote URL and handles redirects.
QNetworkReply * reply()
Returns a reference to the network reply.
void cancel()
Cancels any ongoing request.
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Emitted when data is received.
QString contentAsString() const
Returns the fetched content as a string.
QString contentAsString() const
Returns the fetched content as a string.
void finished()
Emitted when content has loaded.
QgsNetworkContentFetcherTask(const QUrl &url, const QString &authcfg=QString(), QgsTask::Flags flags=QgsTask::CanCancel)
Constructor for a QgsNetworkContentFetcherTask which fetches the specified url.
~QgsNetworkContentFetcherTask() override
bool run() override
Performs the task's operation.
void errorOccurred(QNetworkReply::NetworkError code, const QString &errorMsg)
Emitted when an error with code error occurred while processing the request errorMsg is a textual des...