9 #include <QHostAddress> 17 , d(new CookiePrivate)
19 qRegisterMetaType<Cookie>();
20 qRegisterMetaType<QList<Cookie>>();
40 if (QNetworkCookie::operator==(other) && d == other.d) {
54 d->sameSite = sameSite;
62 return QByteArrayLiteral(
"None");
64 return QByteArrayLiteral(
"Lax");
66 return QByteArrayLiteral(
"Strict");
89 result +=
"; HttpOnly";
91 result +=
"; SameSite=";
92 result += sameSiteToRawString(d->sameSite);
95 result +=
"; expires=";
98 QStringLiteral(
"ddd, dd-MMM-yyyy hh:mm:ss 'GMT"))
101 if (!
domain().isEmpty()) {
102 result +=
"; domain=";
103 if (
domain().startsWith(u
'.')) {
117 if (!
path().isEmpty()) {
125 #ifndef QT_NO_DEBUG_STREAM 136 #include "moc_cookie.cpp"
QByteArray toRawForm(RawForm form=Full) const
Returns the raw form of this Cookie.
QByteArray name() const const
QString toString(QDate date, FormatType format) const const
bool operator==(const QNetworkCookie &other) const const
SameSite sameSitePolicy() const
Returns the "SameSite" option if specified in the cookie string, SameSite::Default if not present...
QByteArray toAce(const QString &domain, AceProcessingOptions options)
Cookie(const QByteArray &name=QByteArray(), const QByteArray &value=QByteArray())
Create a new Cookie object, initializing the cookie name to name and its value to value...
bool isSessionCookie() const const
QString path() const const
QNetworkCookie & operator=(const QNetworkCookie &other)
The Cutelyst namespace holds all public Cutelyst API.
QByteArray value() const const
~Cookie()
Destroys this Cookie object.
bool operator==(const Cookie &other) const
Returns true if this cookie is equal to other.
QDateTime expirationDate() const const
QString domain() const const
QByteArray toLatin1() const const
int protocol() const const
void setSameSitePolicy(SameSite sameSite)
Sets the "SameSite" option of this cookie to sameSite.
bool isSecure() const const
Cookie & operator=(Cookie &&other) noexcept
Move assigns the contents of the Cookie object other to this object.
bool isHttpOnly() const const
QByteArray toUtf8() const const