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"
SameSite sameSitePolicy() const
Returns the "SameSite" option if specified in the cookie string, SameSite::Default if not present.
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.
void setSameSitePolicy(SameSite sameSite)
Sets the "SameSite" option of this cookie to sameSite.
bool operator==(const Cookie &other) const
Returns true if this cookie is equal to other.
~Cookie()
Destroys this Cookie object.
Cookie & operator=(Cookie &&other) noexcept
Move assigns the contents of the Cookie object other to this object.
QByteArray toRawForm(RawForm form=Full) const
Returns the raw form of this Cookie.
The Cutelyst namespace holds all public Cutelyst API.
QAbstractSocket::NetworkLayerProtocol protocol() const const
QString toString(qlonglong i) const const
QNetworkCookie(const QByteArray &name, const QByteArray &value)
QString domain() const const
QDateTime expirationDate() const const
bool isHttpOnly() const const
bool isSecure() const const
bool isSessionCookie() const const
QByteArray name() const const
QNetworkCookie & operator=(const QNetworkCookie &other)
bool operator==(const QNetworkCookie &other) const const
QString path() const const
QByteArray value() const const
QByteArray toLatin1() const const
QByteArray toUtf8() const const
QByteArray toAce(const QString &domain)