Class: QgsNetworkRequestParameters

Encapsulates parameters and properties of a network request.

Added in version 3.6.

class qgis.core.QgsNetworkRequestParameters[source]

Bases: object

__init__()
__init__(operation: QNetworkAccessManager.Operation, request: QNetworkRequest, requestId: int, content: QByteArray | bytes | bytearray = QByteArray())

Constructor for QgsNetworkRequestParameters, with the specified network operation and original request.

Parameters:
  • operation (QNetworkAccessManager.Operation)

  • request (QNetworkRequest)

  • requestId (int)

  • content (Union[QByteArray, bytes, bytearray] = QByteArray())

__init__(a0: QgsNetworkRequestParameters)
Parameters:

a0 (QgsNetworkRequestParameters)

AttributeInitiatorClass = 4000
AttributeInitiatorRequestId = 4001
class RequestAttributes

Bases: int

content(self) QByteArray[source]

Returns the request’s content. This is only used for POST or PUT operation requests.

Return type:

QByteArray

initiatorClassName(self) str[source]

Returns the class name of the object which initiated this request.

This is only available for QNetworkRequests which have had the QgsNetworkRequestParameters.AttributeInitiatorClass attribute set.

Return type:

str

initiatorRequestId(self) Any[source]

Returns the internal ID used by the object which initiated this request to identify individual requests.

This is only available for QNetworkRequests which have had the QgsNetworkRequestParameters.AttributeInitiatorRequestId attribute set.

Return type:

Any

operation(self) QNetworkAccessManager.Operation[source]

Returns the request operation, e.g. GET or POST.

Return type:

QNetworkAccessManager.Operation

originatingThreadId(self) str[source]

Returns a string identifying the thread which the request originated from.

Return type:

str

request(self) QNetworkRequest[source]

Returns the network request.

This is the original network request sent to QgsNetworkAccessManager, but with QGIS specific configuration options such as proxy handling and SSL exceptions applied.

Return type:

QNetworkRequest

requestId(self) int[source]

Returns a unique ID identifying the request.

Return type:

int