QNetworkRequest req(...)
QNetworkCookie cookie1("name1", "value1");
QNetworkCookie cookie2("name2", "value2");
QList<QNetworkCookie> cookies;
cookies << cookie1 << cookie2;
req.setHeader(QNetworkRequest::CookieHeader, cookies);
QNetworkRequest req(...)
QNetworkCookie cookie1("name1", "value1");
QNetworkCookie cookie2("name2", "value2");
QList<QNetworkCookie> cookies;
cookies << cookie1 << cookie2;
req.setHeader(QNetworkRequest::CookieHeader, cookies);
To copy to clipboard, switch view to plain text mode
If you really need both cookies be set on the same header call, use QNetworkRequest::setRawHeader() just don't mix it with setHeader().
Bookmarks