Soup.CookieJar.add_cookie_with_first_party

### Method

# Soup CookieJaradd_cookie_with_first_party

#### Declaration [src]

    void
    soup_cookie_jar_add_cookie_with_first_party (
      SoupCookieJar* jar,
      GUri* first_party,
      SoupCookie* cookie
    )

#### Description [src]

Adds `cookie` to `jar`.

Emits the `SoupCookieJar::changed` signal if we are modifying an existing cookie or adding a valid new cookie (‘valid’ means that the cookie’s expire date is not in the past).

`first_party` will be used to reject cookies coming from third party resources in case such a security policy is set in the `jar`.

`cookie` will be ‘stolen’ by the jar, so don’t free it afterwards.

For secure cookies to work properly you may want to use `soup_cookie_jar_add_cookie_full()`.

#### Parameters

`first_party` | `GUri`
| The URI for the main document.
| The data is owned by the caller of the function.
`cookie` | `SoupCookie`
| A `SoupCookie`.
| The instance takes ownership of the data, and is responsible for freeing it.