setCookie

open fun setCookie(uri: <Error class: unknown class>, cookie: String)

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 enum@CookieJarAcceptPolicy set is either %SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY or %SOUP_COOKIE_JAR_ACCEPT_GRANDFATHERED_THIRD_PARTY you'll need to use method@CookieJar.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

the URI setting the cookie

cookie

the stringified cookie to set