Soup.CookieJar
Description: Reference for Soup.CookieJar

### Class

# SoupCookieJar

#### Description [src]

    class Soup.CookieJar : GObject.Object
      implements Soup.SessionFeature {
      /* No available fields */
    }

Automatic cookie handling for SoupSession.

A `SoupCookieJar` stores `SoupCookie`s and arrange for them to be sent with the appropriate `SoupMessage`s. `SoupCookieJar` implements `SoupSessionFeature`, so you can add a cookie jar to a session with `soup_session_add_feature()` or `soup_session_add_feature_by_type()`.

Note that the base `SoupCookieJar` class does not support any form of long-term cookie persistence.

#### Ancestors

- GObject

#### Descendants

- SoupCookieJarDB
- SoupCookieJarText

#### Implements

- SoupSessionFeature

#### Constructors

###### soup_cookie_jar_new

Creates a new `SoupCookieJar`.

#### Instance methods

###### soup_cookie_jar_add_cookie

Adds `cookie` to `jar`.

###### soup_cookie_jar_add_cookie_full

Adds `cookie` to `jar`.

###### soup_cookie_jar_add_cookie_with_first_party

Adds `cookie` to `jar`.

###### soup_cookie_jar_all_cookies

Constructs a `GList` with every cookie inside the `jar`.

###### soup_cookie_jar_delete_cookie

Deletes `cookie` from `jar`.

###### soup_cookie_jar_get_accept_policy

Gets `jar`‘s `SoupCookieJarAcceptPolicy`.

###### soup_cookie_jar_get_cookie_list

Retrieves the list of cookies that would be sent with a request to `uri` as a `GList` of `SoupCookie` objects.

###### soup_cookie_jar_get_cookie_list_with_same_site_info

This is an extended version of `soup_cookie_jar_get_cookie_list()` that provides more information required to use SameSite cookies.

###### soup_cookie_jar_get_cookies

Retrieves (in Cookie-header form) the list of cookies that would be sent with a request to `uri`.

###### soup_cookie_jar_is_persistent

Gets whether `jar` stores cookies persistenly.

###### soup_cookie_jar_set_accept_policy

Sets `policy` as the cookie acceptance policy for `jar`.

###### soup_cookie_jar_set_cookie

Adds `cookie` to `jar`, exactly as though it had appeared in a Set-Cookie header returned from a request to `uri`.

###### soup_cookie_jar_set_cookie_with_first_party

Adds `cookie` to `jar`, exactly as though it had appeared in a Set-Cookie header returned from a request to `uri`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Soup.CookieJar:accept-policy

The policy the jar should follow to accept or reject cookies.

###### Soup.CookieJar:read-only

Whether or not the cookie jar is read-only.

#### Signals

###### Soup.CookieJar::changed

Emitted when `jar` changes.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct SoupCookieJarClass {
      GObjectClass parent_class;
      void (* save) (
        SoupCookieJar* jar
      );
      gboolean (* is_persistent) (
        SoupCookieJar* jar
      );
      void (* changed) (
        SoupCookieJar* jar,
        SoupCookie* old_cookie,
        SoupCookie* new_cookie
      );
      gpointer padding;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`save: void (* save) ( SoupCookieJar* jar )`

  No description available.

`is_persistent: gboolean (* is_persistent) ( SoupCookieJar* jar )`

  No description available.

`changed: void (* changed) ( SoupCookieJar* jar, SoupCookie* old_cookie, SoupCookie* new_cookie )`

  No description available.

`padding: gpointer`

  No description available.

#### Virtual methods

###### Soup.CookieJarClass.changed

No description available.

###### Soup.CookieJarClass.is_persistent

Gets whether `jar` stores cookies persistenly.

###### Soup.CookieJarClass.save

No description available.