interface Cookie
Represents an HTTP Cookie.
All cookies must have a name and a value and can optionally have other fields set such as path, domain, etc.
(Derived from io.netty.handler.codec.http.Cookie)
open static fun cookie(name: String, value: String): Cookie
Create a new cookie open static fun cookie(nettyCookie: Cookie): Cookie
Create a new cookie from a Netty cookie |
|
abstract fun encode(): String
Encode the cookie to a string. This is what is used in the Set-Cookie header |
|
abstract fun getDomain(): String |
|
abstract fun getName(): String |
|
abstract fun getPath(): String |
|
abstract fun getValue(): String |
|
abstract fun isChanged(): Boolean
Has the cookie been changed? Changed cookies will be saved out in the response and sent to the browser. |
|
abstract fun isFromUserAgent(): Boolean
Has this Cookie been sent from the User Agent (the browser)? or was created during the executing on the request. |
|
abstract fun setChanged(changed: Boolean): Unit
Set the cookie as being changed. Changed will be true for a cookie just created, false by default if just read from the request |
|
abstract fun setDomain(domain: String): Cookie
Sets the domain of this cookie |
|
abstract fun setHttpOnly(httpOnly: Boolean): Cookie
Determines if this cookie is HTTP only. If set to true, this cookie cannot be accessed by a client side script. However, this works only if the browser supports it. For for information, please look here. |
|
abstract fun setMaxAge(maxAge: Long): Cookie
Sets the maximum age of this cookie in seconds. If an age of |
|
abstract fun setPath(path: String): Cookie
Sets the path of this cookie. |
|
abstract fun setSecure(secure: Boolean): Cookie
Sets the security getStatus of this cookie |
|
abstract fun setValue(value: String): Cookie
Sets the value of this cookie |