Skip to content

PythonQt.QtNetwork.QNetworkCookie · declarations 001

Back to PythonQt.QtNetwork.QNetworkCookie

Full instance-attribute

Full: Any

NameAndValueOnly instance-attribute

NameAndValueOnly: Any

RawForm instance-attribute

RawForm: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

domain

domain() -> str

X.domain() -> str

Supplemental documentation: Qt 5 reference:

QString QNetworkCookie::domain() const

Returns the domain this cookie is associated with. This corresponds to the "domain" field of the cookie string.

Note that the domain here may start with a dot, which is not a valid hostname. However, it means this cookie matches all hostnames ending with that domain name.

See also setDomain().

Upstream PySide2 reference signatures (binding differences may apply):

domain(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#domain

expirationDate

expirationDate() -> Any

X.expirationDate() -> PythonQt.QtCore.QDateTime

Supplemental documentation: Qt 5 reference:

QDateTime QNetworkCookie::expirationDate() const

Returns the expiration date for this cookie. If this cookie is a session cookie, the QDateTime returned will not be valid. If the date is in the past, this cookie has already expired and should not be sent again back to a remote server.

The expiration date corresponds to the parameters of the "expires" entry in the cookie string.

See also isSessionCookie() and setExpirationDate().

Upstream PySide2 reference signatures (binding differences may apply):

expirationDate(self) -> PySide2.QtCore.QDateTime

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#expirationDate

hasSameIdentifier

hasSameIdentifier(other: Any) -> bool

X.hasSameIdentifier(other) -> bool

Supplemental documentation: Qt 5 reference:

bool QNetworkCookie::hasSameIdentifier(const QNetworkCookie \&other) const

Returns true if this cookie has the same identifier tuple as other. The identifier tuple is composed of the name, domain and path.

See also operator\=\=().

Upstream PySide2 reference signatures (binding differences may apply):

hasSameIdentifier(self, other: PySide2.QtNetwork.QNetworkCookie) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#hasSameIdentifier

isHttpOnly

isHttpOnly() -> bool

X.isHttpOnly() -> bool

Supplemental documentation: Qt 5 reference:

bool QNetworkCookie::isHttpOnly() const

Returns true if the "HttpOnly" flag is enabled for this cookie.

A cookie that is "HttpOnly" is only set and retrieved by the network requests and replies; i.e., the HTTP protocol. It is not accessible from scripts running on browsers.

This function was introduced in Qt 4.5.

See also isSecure().

Upstream PySide2 reference signatures (binding differences may apply):

isHttpOnly(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#isHttpOnly

isSecure

isSecure() -> bool

X.isSecure() -> bool

Supplemental documentation: Qt 5 reference:

bool QNetworkCookie::isSecure() const

Returns true if the "secure" option was specified in the cookie string, false otherwise.

Secure cookies may contain private information and should not be resent over unencrypted connections.

See also setSecure().

Upstream PySide2 reference signatures (binding differences may apply):

isSecure(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#isSecure

isSessionCookie

isSessionCookie() -> bool

X.isSessionCookie() -> bool

Supplemental documentation: Qt 5 reference:

bool QNetworkCookie::isSessionCookie() const

Returns true if this cookie is a session cookie. A session cookie is a cookie which has no expiration date, which means it should be discarded when the application's concept of session is over (usually, when the application exits).

See also expirationDate() and setExpirationDate().

Upstream PySide2 reference signatures (binding differences may apply):

isSessionCookie(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#isSessionCookie

name

name() -> Any

X.name() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QNetworkCookie::name() const

Returns the name of this cookie. The only mandatory field of a cookie is its name, without which it is not considered valid.

See also setName() and value().

Upstream PySide2 reference signatures (binding differences may apply):

name(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#name

normalize

normalize(url: Any) -> None

X.normalize(url)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::normalize(const QUrl \&url)

This functions normalizes the path and domain of the cookie if they were previously empty. The url parameter is used to determine the correct domain and path.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

normalize(self, url: PySide2.QtCore.QUrl) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#normalize

parseCookies

parseCookies(cookieString: Any) -> tuple

X.parseCookies(cookieString) -> tuple

Supplemental documentation: Qt 5 reference:

[static] QList\<QNetworkCookie> QNetworkCookie::parseCookies(const QByteArray \&cookieString)

Parses the cookie string cookieString as received from a server response in the "Set-Cookie:" header. If there's a parsing error, this function returns an empty list.

Since the HTTP header can set more than one cookie at the same time, this function returns a QList\<QNetworkCookie>, one for each cookie that is parsed.

See also toRawForm().

Upstream PySide2 reference signatures (binding differences may apply):

parseCookies(cookieString: PySide2.QtCore.QByteArray) -> typing.List[PySide2.QtNetwork.QNetworkCookie]

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#parseCookies

path

path() -> str

X.path() -> str

Supplemental documentation: Qt 5 reference:

QString QNetworkCookie::path() const

Returns the path associated with this cookie. This corresponds to the "path" field of the cookie string.

See also setPath().

Upstream PySide2 reference signatures (binding differences may apply):

path(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#path

setDomain

setDomain(domain: str) -> None

X.setDomain(domain)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setDomain(const QString \&domain)

Sets the domain associated with this cookie to be domain.

See also domain().

Upstream PySide2 reference signatures (binding differences may apply):

setDomain(self, domain: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setDomain

setExpirationDate

setExpirationDate(date: Any) -> None

X.setExpirationDate(date)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setExpirationDate(const QDateTime \&date)

Sets the expiration date of this cookie to date. Setting an invalid expiration date to this cookie will mean it's a session cookie.

See also isSessionCookie() and expirationDate().

Upstream PySide2 reference signatures (binding differences may apply):

setExpirationDate(self, date: PySide2.QtCore.QDateTime) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setExpirationDate

setHttpOnly

setHttpOnly(enable: bool) -> None

X.setHttpOnly(enable)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setHttpOnly(bool enable)

Sets this cookie's "HttpOnly" flag to enable.

This function was introduced in Qt 4.5.

See also isHttpOnly().

Upstream PySide2 reference signatures (binding differences may apply):

setHttpOnly(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setHttpOnly

setName

setName(cookieName: Any) -> None

X.setName(cookieName)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setName(const QByteArray \&cookieName)

Sets the name of this cookie to be cookieName. Note that setting a cookie name to an empty QByteArray will make this cookie invalid.

See also name() and value().

Upstream PySide2 reference signatures (binding differences may apply):

setName(self, cookieName: PySide2.QtCore.QByteArray) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setName

setPath

setPath(path: str) -> None

X.setPath(path)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setPath(const QString \&path)

Sets the path associated with this cookie to be path.

See also path().

Upstream PySide2 reference signatures (binding differences may apply):

setPath(self, path: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setPath

setSecure

setSecure(enable: bool) -> None

X.setSecure(enable)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setSecure(bool enable)

Sets the secure flag of this cookie to enable.

Secure cookies may contain private information and should not be resent over unencrypted connections.

See also isSecure().

Upstream PySide2 reference signatures (binding differences may apply):

setSecure(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setSecure

setValue

setValue(value: Any) -> None

X.setValue(value)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::setValue(const QByteArray \&value)

Sets the value of this cookie to be value.

See also value() and name().

Upstream PySide2 reference signatures (binding differences may apply):

setValue(self, value: PySide2.QtCore.QByteArray) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#setValue

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QNetworkCookie::swap(QNetworkCookie \&other)

Swaps this cookie 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.QNetworkCookie) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#swap

toRawForm

toRawForm(form: Any) -> Any

X.toRawForm(form) -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QNetworkCookie::toRawForm(QNetworkCookie::RawForm form \= Full) const

Returns the raw form of this QNetworkCookie. The QByteArray returned by this function is suitable for an HTTP header, either in a server response (the Set-Cookie header) or the client request (the Cookie header). You can choose from one of two formats, using form.

See also parseCookies().

Upstream PySide2 reference signatures (binding differences may apply):

toRawForm(self, form: PySide2.QtNetwork.QNetworkCookie.RawForm=...) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#toRawForm

value

value() -> Any

X.value() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QNetworkCookie::value() const

Returns this cookies value, as specified in the cookie string. Note that a cookie is still valid if its value is empty.

Cookie name-value pairs are considered opaque to the application: that is, their values don't mean anything.

See also setValue() and name().

Upstream PySide2 reference signatures (binding differences may apply):

value(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html#value