Skip to content

PythonQt.QtNetwork.QNetworkCookieJar · declarations 001

Back to PythonQt.QtNetwork.QNetworkCookieJar

allCookies

allCookies() -> tuple

X.allCookies() -> tuple

Supplemental documentation: Qt 5 reference:

[protected] QList\<QNetworkCookie> QNetworkCookieJar::allCookies() const

Returns all cookies stored in this cookie jar. This function is suitable for derived classes to save cookies to disk, as well as to implement cookie expiration and other policies.

See also setAllCookies() and cookiesForUrl().

Upstream PySide2 reference signatures (binding differences may apply):

allCookies(self) -> typing.List[PySide2.QtNetwork.QNetworkCookie]

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#allCookies

cookiesForUrl

cookiesForUrl(url: Any) -> tuple

X.cookiesForUrl(url) -> tuple

Supplemental documentation: Qt 5 reference:

[virtual] QList\<QNetworkCookie> QNetworkCookieJar::cookiesForUrl(const QUrl \&url) const

Returns the cookies to be added to when a request is sent to url. This function is called by the default QNetworkAccessManager::createRequest(), which adds the cookies returned by this function to the request being sent.

If more than one cookie with the same name is found, but with differing paths, the one with longer path is returned before the one with shorter path. In other words, this function returns cookies sorted decreasingly by path length.

The default QNetworkCookieJar class implements only a very basic security policy (it makes sure that the cookies' domain and path match the reply's). To enhance the security policy with your own algorithms, override cookiesForUrl().

See also setCookiesFromUrl() and QNetworkAccessManager::setCookieJar().

Upstream PySide2 reference signatures (binding differences may apply):

cookiesForUrl(self, url: PySide2.QtCore.QUrl) -> typing.List[PySide2.QtNetwork.QNetworkCookie]

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#cookiesForUrl

deleteCookie

deleteCookie(cookie: Any) -> bool

X.deleteCookie(cookie) -> bool

Supplemental documentation: Qt 5 reference:

Deletes from cookie jar the cookie found to have the same identifier as cookie.

Returns true if a cookie was deleted, false otherwise.

This function was introduced in Qt 5.0.

See also QNetworkCookie::hasSameIdentifier().

Upstream PySide2 reference signatures (binding differences may apply):

deleteCookie(self, cookie: PySide2.QtNetwork.QNetworkCookie) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#deleteCookie

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QNetworkCookieJar.destroyed; argument details are not documented.

insertCookie

insertCookie(cookie: Any) -> bool

X.insertCookie(cookie) -> bool

Supplemental documentation: Qt 5 reference:

Adds cookie to this cookie jar.

Returns true if cookie was added, false otherwise.

If a cookie with the same identifier already exists in the cookie jar, it will be overridden.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

insertCookie(self, cookie: PySide2.QtNetwork.QNetworkCookie) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#insertCookie

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QNetworkCookieJar.objectNameChanged; argument details are not documented.

setAllCookies

setAllCookies(cookieList: Any) -> None

X.setAllCookies(cookieList)

Supplemental documentation: Qt 5 reference:

[protected] void QNetworkCookieJar::setAllCookies(const QList\<QNetworkCookie> \&cookieList)

Sets the internal list of cookies held by this cookie jar to be cookieList. This function is suitable for derived classes to implement loading cookies from permanent storage, or their own cookie acceptance policies by reimplementing setCookiesFromUrl().

See also allCookies() and setCookiesFromUrl().

Upstream PySide2 reference signatures (binding differences may apply):

setAllCookies(self, cookieList: typing.Sequence[PySide2.QtNetwork.QNetworkCookie]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#setAllCookies

setCookiesFromUrl

setCookiesFromUrl(cookieList: Any, url: Any) -> bool

X.setCookiesFromUrl(cookieList, url) -> bool

Supplemental documentation: Qt 5 reference:

[virtual] bool QNetworkCookieJar::setCookiesFromUrl(const QList\<QNetworkCookie> \&cookieList, const QUrl \&url)

Adds the cookies in the list cookieList to this cookie jar. Before being inserted cookies are normalized.

Returns true if one or more cookies are set for url, otherwise false.

If a cookie already exists in the cookie jar, it will be overridden by those in cookieList.

The default QNetworkCookieJar class implements only a very basic security policy (it makes sure that the cookies' domain and path match the reply's). To enhance the security policy with your own algorithms, override setCookiesFromUrl().

Also, QNetworkCookieJar does not have a maximum cookie jar size. Reimplement this function to discard older cookies to create room for new ones.

See also cookiesForUrl(), QNetworkAccessManager::setCookieJar(), and QNetworkCookie::normalize().

Upstream PySide2 reference signatures (binding differences may apply):

setCookiesFromUrl(self, cookieList: typing.Sequence[PySide2.QtNetwork.QNetworkCookie], url: PySide2.QtCore.QUrl) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#setCookiesFromUrl

updateCookie

updateCookie(cookie: Any) -> bool

X.updateCookie(cookie) -> bool

Supplemental documentation: Qt 5 reference:

If a cookie with the same identifier as cookie exists in this cookie jar it will be updated. This function uses insertCookie().

Returns true if cookie was updated, false if no cookie in the jar matches the identifier of cookie.

This function was introduced in Qt 5.0.

See also QNetworkCookie::hasSameIdentifier().

Upstream PySide2 reference signatures (binding differences may apply):

updateCookie(self, cookie: PySide2.QtNetwork.QNetworkCookie) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#updateCookie

validateCookie

validateCookie(cookie: Any, url: Any) -> bool

X.validateCookie(cookie, url) -> bool

Supplemental documentation: Qt 5 reference:

Returns true if the domain and path of cookie are valid, false otherwise. The url parameter is used to determine if the domain specified in the cookie is allowed.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

validateCookie(self, cookie: PySide2.QtNetwork.QNetworkCookie, url: PySide2.QtCore.QUrl) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookiejar.html#validateCookie