Class: QgsNetworkContentFetcherRegistry¶
Registry for temporary fetched files.
This provides a simple way of downloading and accessing remote files during QGIS application running.
See also
Added in version 3.2.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Methods
Initialize a download for the given URL |
|
Returns the path to a local file or to a temporary file previously fetched by the registry |
- class qgis.core.QgsNetworkContentFetcherRegistry[source]¶
Bases:
QObject- __init__()
Create the registry for temporary downloaded files
- FetchingMode¶
alias of
ActionStart
- fetch(self, url: str | None, fetchingMode: Qgis.ActionStart = Qgis.ActionStart.Deferred, authConfig: str | None = '', headers: QgsHttpHeaders = QgsHttpHeaders()) QgsFetchedContent | None[source]¶
Initialize a download for the given URL
- Parameters:
url (Optional[str]) – the URL to be fetched
fetchingMode (Qgis.ActionStart = Qgis.ActionStart.Deferred) – defines if the download will start immediately or shall be manually triggered
authConfig (Optional[str] = '') – authentication configuration id to be used while fetching
headers (
QgsHttpHeaders= QgsHttpHeaders()) – optional HTTP headers to add to the request (since QGIS 3.44.8)
Note
If the download starts immediately, it will not redownload any already fetched or currently fetching file.
- Return type:
Optional[QgsFetchedContent]