CookieJar
Object Hierarchy:
Soup.CookieJar
Soup.CookieJar
Soup.CookieJar
GLib.Object
GLib.Object
GLib.Object->Soup.CookieJar
Soup.SessionFeature
Soup.SessionFeature
Soup.SessionFeature->Soup.CookieJar
Description:
[
CCode ( type_id =
"soup_cookie_jar_get_type ()" ) ]
public class CookieJar :
Object ,
SessionFeature
Automatic cookie handling for SoupSession.
A CookieJar stores [struct@Cookie]s and arrange for them to be sent with the appropriate [class@Message]s.
CookieJar implements [iface@SessionFeature], so you can add a cookie jar to a session with [
method@Session.add_feature] or [method@Session.add_feature_by_type].
Note that the base CookieJar class does not support any form of long-term cookie persistence.
Content:
Properties:
Creation methods:
Methods:
public void add_cookie (owned Cookie cookie)
Adds cookie
to this .
public void add_cookie_full (owned Cookie cookie, Uri ? uri, Uri ? first_party)
Adds cookie
to this .
public void add_cookie_with_first_party (Uri first_party, owned Cookie cookie)
Adds cookie
to this .
public SList <Cookie > all_cookies ()
Constructs a [struct@GLib.
public void delete_cookie (Cookie cookie)
Deletes cookie
from this .
public CookieJarAcceptPolicy get_accept_policy ()
Gets this 's [enum@CookieJarAcceptPolicy].
public SList <Cookie > get_cookie_list (Uri uri, bool for_http)
Retrieves the list of cookies that would be sent with a request to uri
as a [struct@GLib.
public SList <Cookie > get_cookie_list_with_same_site_info (Uri uri, Uri ? top_level, Uri ? site_for_cookies, bool for_http, bool is_safe_method, bool is_top_level_navigation)
This is an extended version of [method@CookieJar.
public string ? get_cookies (Uri uri, bool for_http)
Retrieves (in Cookie-header form) the list of cookies that would be sent
with a request to uri
.
public virtual bool is_persistent ()
Gets whether this stores cookies
persistenly.
public virtual void save ()
public void set_accept_policy (CookieJarAcceptPolicy policy)
Sets policy
as the cookie acceptance policy for
this .
public void set_cookie (Uri uri, string cookie)
Adds cookie
to this , exactly
as though it had appeared in a Set-Cookie header returned from a request to uri
.
public void set_cookie_with_first_party (Uri uri, Uri first_party, string cookie)
Adds cookie
to this , exactly
as though it had appeared in a Set-Cookie header returned from a request to uri
.
Signals:
Inherited Members:
All known members inherited from class GLib.Object