api

http4k / org.http4k.core.cookie / Cookie

Cookie

data class Cookie (source)

Constructors

Name Summary
<init> Cookie(name: String, value: String, maxAge: Long? = null, expires: LocalDateTime? = null, domain: String? = null, path: String? = null, secure: Boolean = false, httpOnly: Boolean = false)

Properties

Name Summary
domain val domain: String?
expires val expires: LocalDateTime?
httpOnly val httpOnly: Boolean
maxAge val maxAge: Long?
name val name: String
path val path: String?
secure val secure: Boolean
value val value: String

Functions

Name Summary
domain fun domain(domain: String): Cookie
expires fun expires(date: LocalDateTime): Cookie
fullCookieString fun fullCookieString(): String
httpOnly fun httpOnly(): Cookie
keyValueCookieString fun keyValueCookieString(): String
maxAge fun maxAge(seconds: Long): Cookie
path fun path(path: String): Cookie
secure fun secure(): Cookie
toString fun toString(): String

Companion Object Functions

Name Summary
parse fun parse(cookieValue: String): Cookie?

Extension Functions

Name Summary
invalidate fun Cookie.invalidate(): Cookie
with fun <T> T.with(vararg modifiers: (T) -> T): T