1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/GetCookies.cpp

20 lines
494 B
C++
Raw Normal View History

#include "GetCookies.h"
#include "WebPage.h"
#include "WebPageManager.h"
#include "NetworkCookieJar.h"
GetCookies::GetCookies(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent)
{
m_buffer = "";
}
void GetCookies::start()
{
2012-06-21 23:34:51 -04:00
NetworkCookieJar *jar = manager()->cookieJar();
foreach (QNetworkCookie cookie, jar->getAllCookies()) {
m_buffer.append(cookie.toRawForm());
m_buffer.append("\n");
}
2013-02-11 18:31:41 -05:00
finish(true, m_buffer);
}