PythonQt.QtNetwork.QHttpPart · declarations 001
Back to PythonQt.QtNetwork.QHttpPart
operator_assign
operator_assign(other: Any) -> Any
X.operator_assign(other) -> PythonQt.QtNetwork.QHttpPart
setBody
setBody(body: Any) -> None
X.setBody(body)
Supplemental documentation: Qt 5 reference:
void QHttpPart::setBody(const QByteArray \&body)
Sets the body of this MIME part to body. The body set with this method will be used unless the device is set via setBodyDevice(). For a large amount of data (e.g. an image), use setBodyDevice(), which will not copy the data internally.
See also setBodyDevice().
Upstream PySide2 reference signatures (binding differences may apply):
setBody(self, body: PySide2.QtCore.QByteArray) -> None
Source: https://doc.qt.io/archives/qt-5.15/qhttppart.html#setBody
setBodyDevice
setBodyDevice(device: Any) -> None
X.setBodyDevice(device)
Supplemental documentation: Qt 5 reference:
void QHttpPart::setBodyDevice(QIODevice *device)
Sets the device to read the content from to device. For large amounts of data this method should be preferred over setBody(), because the content is not copied when using this method, but read directly from the device. device must be open and readable. QHttpPart does not take ownership of device, i.e. the device must be closed and destroyed if necessary. if device is sequential (e.g. sockets, but not files), QNetworkAccessManager::post() should be called after device has emitted finished(). For unsetting the device and using data set via setBody(), use "setBodyDevice(0)".
See also setBody() and QNetworkAccessManager::post().
Upstream PySide2 reference signatures (binding differences may apply):
setBodyDevice(self, device: PySide2.QtCore.QIODevice) -> None
Source: https://doc.qt.io/archives/qt-5.15/qhttppart.html#setBodyDevice
setHeader
setHeader(header: Any, value: Any) -> None
X.setHeader(header, value)
Supplemental documentation: Qt 5 reference:
void QHttpPart::setHeader(QNetworkRequest::KnownHeaders header, const QVariant \&value)
Sets the value of the known header header to be value, overriding any previously set headers.
See also QNetworkRequest::KnownHeaders, setRawHeader(), and QNetworkRequest::setHeader().
Upstream PySide2 reference signatures (binding differences may apply):
setHeader(self, header: PySide2.QtNetwork.QNetworkRequest.KnownHeaders, value: typing.Any) -> None
Source: https://doc.qt.io/archives/qt-5.15/qhttppart.html#setHeader
setRawHeader
setRawHeader(headerName: Any, headerValue: Any) -> None
X.setRawHeader(headerName, headerValue)
Supplemental documentation: Qt 5 reference:
void QHttpPart::setRawHeader(const QByteArray \&headerName, const QByteArray \&headerValue)
Sets the header headerName to be of value headerValue. If headerName corresponds to a known header (see QNetworkRequest::KnownHeaders), the raw format will be parsed and the corresponding "cooked" header will be set as well.
Note: Setting the same header twice overrides the previous setting. To accomplish the behaviour of multiple HTTP headers of the same name, you should concatenate the two values, separating them with a comma (",") and set one single raw header.
See also QNetworkRequest::KnownHeaders, setHeader(), and QNetworkRequest::setRawHeader().
Upstream PySide2 reference signatures (binding differences may apply):
setRawHeader(self, headerName: PySide2.QtCore.QByteArray, headerValue: PySide2.QtCore.QByteArray) -> None
Source: https://doc.qt.io/archives/qt-5.15/qhttppart.html#setRawHeader
swap
swap(other: Any) -> None
X.swap(other)
Supplemental documentation: Qt 5 reference:
void QHttpPart::swap(QHttpPart \&other)
Swaps this HTTP part with other. This function is very fast and never fails.
This function was introduced in Qt 5.0.
Upstream PySide2 reference signatures (binding differences may apply):
swap(self, other: PySide2.QtNetwork.QHttpPart) -> None
Source: https://doc.qt.io/archives/qt-5.15/qhttppart.html#swap