Subgroup: Network
Class: QgsNetworkAccessManager¶
-
class
qgis.core.
QgsNetworkAccessManager
¶ Bases:
PyQt5.QtNetwork.QNetworkAccessManager
network access manager for QGIS
New 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
activeConfiguration
addStrictTransportSecurityHosts
blockSignals
cache
cacheLoadControlFromName
Get QNetworkRequest.CacheLoadControl from name cacheLoadControlName
Get name for QNetworkRequest.CacheLoadControl childEvent
children
clearAccessCache
clearConnectionCache
configuration
connectNotify
connectToHost
connectToHostEncrypted
cookieJar
createRequest
customEvent
deleteLater
deleteResource
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
excludeList
retrieve exclude list (urls shouldn’t use the fallback proxy) fallbackProxy
retrieve fall back proxy (for urls that no factory returned proxies for) findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] get
head
inherits
insertProxyFactory
insert a factory into the proxy factories list installEventFilter
instance
isSignalConnected
isStrictTransportSecurityEnabled
isWidgetType
isWindowType
killTimer
metaObject
moveToThread
networkAccessible
objectName
parent
post
post(self, QNetworkRequest, Union[QByteArray, bytes, bytearray]) -> QNetworkReply property
proxy
proxyFactories
retrieve proxy factory list proxyFactory
put
put(self, QNetworkRequest, Union[QByteArray, bytes, bytearray]) -> QNetworkReply pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
redirectPolicy
removeEventFilter
removeProxyFactory
remove a factory from the proxy factories list sendCustomRequest
sendCustomRequest(self, QNetworkRequest, Union[QByteArray, bytes, bytearray], Union[QByteArray, bytes, bytearray]) -> QNetworkReply sender
senderSignalIndex
setCache
setConfiguration
setCookieJar
setFallbackProxyAndExcludes
set fallback proxy and URL that shouldn’t use it. setNetworkAccessible
setObjectName
setParent
setProperty
setProxy
setProxyFactory
setRedirectPolicy
setStrictTransportSecurityEnabled
setupDefaultProxyAndCache
Setup the NAM according to the user’s settings signalsBlocked
startTimer
strictTransportSecurityHosts
supportedSchemes
supportedSchemesImplementation
thread
timerEvent
tr
useSystemProxy
return whether the system proxy should be used Attributes
Accessible
CustomOperation
DeleteOperation
GetOperation
HeadOperation
NotAccessible
PostOperation
PutOperation
UnknownAccessibility
authenticationRequired
authenticationRequired(self, QNetworkReply, QAuthenticator) [signal] destroyed
destroyed(self, QObject = None) [signal] encrypted
encrypted(self, QNetworkReply) [signal] finished
finished(self, QNetworkReply) [signal] networkAccessibleChanged
networkAccessibleChanged(self, QNetworkAccessManager.NetworkAccessibility) [signal] objectNameChanged
objectNameChanged(self, str) [signal] preSharedKeyAuthenticationRequired
preSharedKeyAuthenticationRequired(self, QNetworkReply, QSslPreSharedKeyAuthenticator) [signal] proxyAuthenticationRequired
proxyAuthenticationRequired(self, QNetworkProxy, QAuthenticator) [signal] requestAboutToBeCreated
requestAboutToBeCreated(self, QNetworkAccessManager.Operation, QNetworkRequest, QIODevice) [signal] requestCreated
requestCreated(self, QNetworkReply) [signal] requestTimedOut
requestTimedOut(self, QNetworkReply) [signal] sslErrors
sslErrors(self, QNetworkReply, object) [signal] staticMetaObject
-
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
-