mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Browser: Add method to get cookies list
This commit is contained in:
parent
81c042a8cd
commit
5f5ee2020e
2 changed files with 12 additions and 0 deletions
|
@ -75,6 +75,17 @@ void CookieJar::dump_cookies() const
|
|||
dbgln("{}", builder.build());
|
||||
}
|
||||
|
||||
Vector<Web::Cookie::Cookie> CookieJar::get_all_cookies() const
|
||||
{
|
||||
Vector<Web::Cookie::Cookie> cookies;
|
||||
cookies.ensure_capacity(m_cookies.size());
|
||||
|
||||
for (auto const& cookie : m_cookies)
|
||||
cookies.unchecked_append(cookie.value);
|
||||
|
||||
return cookies;
|
||||
}
|
||||
|
||||
Optional<String> CookieJar::canonicalize_domain(const URL& url)
|
||||
{
|
||||
// https://tools.ietf.org/html/rfc6265#section-5.1.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue