Soup.CookieJar.set_cookie

### Method

# Soup CookieJarset_cookie

#### Declaration [src]

    void
    soup_cookie_jar_set_cookie (
      SoupCookieJar* jar,
      GUri* uri,
      const char* cookie
    )

#### Description [src]

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

Keep in mind that if the `SoupCookieJarAcceptPolicy` set is either `SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY` or `SOUP_COOKIE_JAR_ACCEPT_GRANDFATHERED_THIRD_PARTY` you’ll need to use `soup_cookie_jar_set_cookie_with_first_party()`, otherwise the jar will have no way of knowing if the cookie is being set by a third party or not.

#### Parameters

`uri`

  Type: `GUri`

  The URI setting the cookie.

  The data is owned by the caller of the method.

`cookie`

  Type: `const char*`

  The stringified cookie to set.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.