Subgroup: Network
Class: QgsNetworkAccessManager¶
-
class
qgis.core.
QgsNetworkAccessManager
¶ Bases:
PyQt5.QtNetwork.QNetworkAccessManager
network access manager for QGISNew in version 1.5.
This class implements the QGIS network access manager. It’s a singleton that can be used across QGIS.
Plugins can insert proxy factories and thereby redirect requests to individual proxies.
If no proxy factories are there or none returns a proxy for an URL a fallback proxy can be set. There’s also a exclude list that defines URLs that the fallback proxy should not be used for, then no proxy will be used.
Methods
cacheLoadControlFromName
Get QNetworkRequest. cacheLoadControlName
Get name for QNetworkRequest. childEvent
connectNotify
createRequest
customEvent
disconnectNotify
excludeList
retrieve exclude list (urls shouldn’t use the fallback proxy) fallbackProxy
retrieve fall back proxy (for urls that no factory returned proxies for) insertProxyFactory
insert a factory into the proxy factories list instance
isSignalConnected
proxyFactories
retrieve proxy factory list receivers
removeProxyFactory
remove a factory from the proxy factories list sender
senderSignalIndex
setFallbackProxyAndExcludes
set fallback proxy and URL that shouldn’t use it. setupDefaultProxyAndCache
Setup the NAM according to the user’s settings supportedSchemesImplementation
timerEvent
useSystemProxy
return whether the system proxy should be used Signals
requestAboutToBeCreated
requestAboutToBeCreated(self, QNetworkAccessManager. requestCreated
requestCreated(self, QNetworkReply) [signal] requestTimedOut
requestTimedOut(self, QNetworkReply) [signal] Attributes
-
cacheLoadControlFromName
(name: str) → QNetworkRequest.CacheLoadControl¶ Get QNetworkRequest.CacheLoadControl from name
-
cacheLoadControlName
(control: QNetworkRequest.CacheLoadControl) → str¶ Get name for QNetworkRequest.CacheLoadControl
-
childEvent
()¶
-
connectNotify
()¶
-
createRequest
(self, op: QNetworkAccessManager.Operation, req: QNetworkRequest, outgoingData: QIODevice = None) → QNetworkReply¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
excludeList
(self) → List[str]¶ retrieve exclude list (urls shouldn’t use the fallback proxy)
-
fallbackProxy
(self) → QNetworkProxy¶ retrieve fall back proxy (for urls that no factory returned proxies for)
-
insertProxyFactory
(self, factory: QNetworkProxyFactory)¶ insert a factory into the proxy factories list
-
instance
() → QgsNetworkAccessManager¶
-
isSignalConnected
()¶
-
proxyFactories
(self) → object¶ retrieve proxy factory list
-
receivers
()¶
-
removeProxyFactory
(self, factory: QNetworkProxyFactory)¶ remove a factory from the proxy factories list
-
requestAboutToBeCreated
¶ requestAboutToBeCreated(self, QNetworkAccessManager.Operation, QNetworkRequest, QIODevice) [signal]
-
requestCreated
¶ requestCreated(self, QNetworkReply) [signal]
-
requestTimedOut
¶ requestTimedOut(self, QNetworkReply) [signal]
-
sender
()¶
-
senderSignalIndex
()¶
-
setFallbackProxyAndExcludes
(self, proxy: QNetworkProxy, excludes: Iterable[str])¶ set fallback proxy and URL that shouldn’t use it.
-
setupDefaultProxyAndCache
(self)¶ Setup the NAM according to the user’s settings
-
supportedSchemesImplementation
()¶
-
timerEvent
()¶
-
useSystemProxy
(self) → bool¶ return whether the system proxy should be used
-