PythonQt.QtNetwork.QNetworkCookie
QNetworkCookie
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
Cookies are small bits of information that stateless protocols like HTTP use to maintain some persistent information across requests.
A cookie is set by a remote server when it replies to a request and it expects the same cookie to be sent back when further requests are sent.
QNetworkCookie holds one such cookie as received from the network. A cookie has a name and a value, but those are opaque to the application (that is, the information stored in them has no meaning to the application). A cookie has an associated path name and domain, which indicate when the cookie should be sent again to the server.
A cookie can also have an expiration date, indicating its validity. If the expiration date is not present, the cookie is considered a "session cookie" and should be discarded when the application exits (or when its concept of session is over).
QNetworkCookie provides a way of parsing a cookie from the HTTP header format using the QNetworkCookie::parseCookies() function. However, when received in a QNetworkReply, the cookie is already parsed.
This class implements cookies as described by the initial cookie specification by Netscape, which is somewhat similar to the RFC 2109 specification, plus the "HttpOnly" extension. The more recent RFC 2965 specification (which uses the Set-Cookie2 header) is not supported.
Source: https://doc.qt.io/archives/qt-5.15/qnetworkcookie.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
Full |
attribute | Any |
|
NameAndValueOnly |
attribute | Any |
|
RawForm |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
domain |
function | (self) -> str |
X.domain() -> str |
expirationDate |
function | (self) -> Any |
X.expirationDate() -> PythonQt.QtCore.QDateTime |
hasSameIdentifier |
function | (self, other: Any) -> bool |
X.hasSameIdentifier(other) -> bool |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isHttpOnly |
function | (self) -> bool |
X.isHttpOnly() -> bool |
isSecure |
function | (self) -> bool |
X.isSecure() -> bool |
isSessionCookie |
function | (self) -> bool |
X.isSessionCookie() -> bool |
name |
function | (self) -> Any |
X.name() -> PythonQt.QtCore.QByteArray |
normalize |
function | (self, url: Any) -> None |
This functions normalizes the path and domain of the cookie if they were previously empty. |
parseCookies |
function | (self, cookieString: Any) -> tuple |
X.parseCookies(cookieString) -> tuple |
path |
function | (self) -> str |
X.path() -> str |
setDomain |
function | (self, domain: str) -> None |
Sets the domain associated with this cookie to be domain. |
setExpirationDate |
function | (self, date: Any) -> None |
Sets the expiration date of this cookie to date. |
setHttpOnly |
function | (self, enable: bool) -> None |
Sets this cookie's "HttpOnly" flag to enable. |
setName |
function | (self, cookieName: Any) -> None |
Sets the name of this cookie to be cookieName. |
setPath |
function | (self, path: str) -> None |
Sets the path associated with this cookie to be path. |
setSecure |
function | (self, enable: bool) -> None |
Sets the secure flag of this cookie to enable. |
setValue |
function | (self, value: Any) -> None |
Sets the value of this cookie to be value. |
swap |
function | (self, other: Any) -> None |
Swaps this cookie with other. |
toRawForm |
function | (self, form: Any) -> Any |
X.toRawForm(form) -> PythonQt.QtCore.QByteArray |
value |
function | (self) -> Any |
X.value() -> PythonQt.QtCore.QByteArray |