Cookie

data class Cookie

Represents a cooke value

Constructors

<init>

Cookie(
    name: String,
    value: String,
    encoding: CookieEncoding = CookieEncoding.URI_ENCODING,
    maxAge: Int = 0,
    expires: GMTDate? = null,
    domain: String? = null,
    path: String? = null,
    secure: Boolean = false,
    httpOnly: Boolean = false,
    extensions: Map<String, String?> = emptyMap())

Represents a cooke value

Properties

domain

val domain: String?

for which it is set

encoding

val encoding: CookieEncoding
  • cookie encoding type

expires

val expires: GMTDate?

date when it expires

extensions

val extensions: Map<String, String?>

additional cookie extensions

httpOnly

val httpOnly: Boolean

only transfer cookie over HTTP, no access from JavaScript

maxAge

val maxAge: Int

number of seconds to keep cookie

name

val name: String

path

val path: String?

for which it is set

secure

val secure: Boolean

send it via secure connection only

value

val value: String