Cookie

class Cookie(pointer: <Error class: unknown class><<Error class: unknown class>>)

Implements HTTP cookies, as described by RFC 6265.

To have a class@Session handle cookies for your appliction automatically, use a class@CookieJar.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val soupCookiePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun appliesToUri(uri: <Error class: unknown class>): Boolean

Tests if @cookie should be sent to @uri.

Link copied to clipboard
fun copy(): Cookie

Copies @cookie.

Link copied to clipboard

Checks if the @cookie's domain and @host match.

Link copied to clipboard
fun equal(cookie2: Cookie): Boolean

Tests if @cookie1 and @cookie2 are equal.

Link copied to clipboard
fun free()

Frees @cookie.

Link copied to clipboard

Gets @cookie's domain.

Link copied to clipboard
fun getExpires(): <Error class: unknown class>?

Gets @cookie's expiration time.

Link copied to clipboard

Gets @cookie's HttpOnly attribute.

Link copied to clipboard

Gets @cookie's name.

Link copied to clipboard

Gets @cookie's path.

Link copied to clipboard

Returns the same-site policy for this cookie.

Link copied to clipboard

Gets @cookie's secure attribute.

Link copied to clipboard

Gets @cookie's value.

Link copied to clipboard
fun setDomain(domain: String)

Sets @cookie's domain to @domain.

Link copied to clipboard
fun setExpires(expires: <Error class: unknown class>)

Sets @cookie's expiration time to @expires.

Link copied to clipboard
fun setHttpOnly(httpOnly: Boolean)

Sets @cookie's HttpOnly attribute to @http_only.

Link copied to clipboard
fun setMaxAge(maxAge: <Error class: unknown class>)

Sets @cookie's max age to @max_age.

Link copied to clipboard
fun setName(name: String)

Sets @cookie's name to @name.

Link copied to clipboard
fun setPath(path: String)

Sets @cookie's path to @path.

Link copied to clipboard

When used in conjunction with method@CookieJar.get_cookie_list_with_same_site_info this sets the policy of when this cookie should be exposed.

Link copied to clipboard
fun setSecure(secure: Boolean)

Sets @cookie's secure attribute to @secure.

Link copied to clipboard
fun setValue(value: String)

Sets @cookie's value to @value.

Link copied to clipboard

Serializes @cookie in the format used by the Cookie header (ie, for returning a cookie from a class@Session to a server).

Link copied to clipboard

Serializes @cookie in the format used by the Set-Cookie header.