api

http4k / org.http4k.core.cookie / Cookie

Cookie

data class Cookie

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, sameSite: SameSite? = null)

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?
sameSite val sameSite: SameSite?
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
sameSite fun sameSite(sameSite: SameSite): 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