Response

zio.http.Cookie.Response
See theResponse companion object
final case class Response(name: String, content: String, domain: Option[String], path: Option[Path], isSecure: Boolean, isHttpOnly: Boolean, maxAge: Option[Duration], sameSite: Option[SameSite]) extends Cookie

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Cookie
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

override def content(content: String): Response

Returns a new cookie derived from this one, but where the content of the cookie is set to the specified value.

Returns a new cookie derived from this one, but where the content of the cookie is set to the specified value.

Attributes

Definition Classes
override def encodeValidate(validate: Boolean): Either[Exception, String]

Encodes the cookie into a string, or fails with an exception if there was a problem during encoding. This encoding method performs validation as specified.

Encodes the cookie into a string, or fails with an exception if there was a problem during encoding. This encoding method performs validation as specified.

Attributes

Definition Classes
override def name(name: String): Response

Returns a new cookie derived from this one, but where the name of the cookie is set to the specified value.

Returns a new cookie derived from this one, but where the name of the cookie is set to the specified value.

Attributes

Definition Classes
def sign(secret: String): Response

Signs cookie content with a secret and returns a signed cookie.

Signs cookie content with a secret and returns a signed cookie.

Attributes

Inherited methods

final def encode: Either[Exception, String]

Encodes the cookie into a string, or fails with an exception if there was a problem during encoding. This encoding method performs no validation.

Encodes the cookie into a string, or fails with an exception if there was a problem during encoding. This encoding method performs no validation.

Attributes

Inherited from:
Cookie
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Converts the cookie to a request cookie. If the cookie is a response cookie, then it is converted into a request cookie by discarding everything except the name and content.

Converts the cookie to a request cookie. If the cookie is a response cookie, then it is converted into a request cookie by discarding everything except the name and content.

Attributes

Inherited from:
Cookie
def toResponse(domain: Option[String], path: Option[Path], isSecure: Boolean, isHttpOnly: Boolean, maxAge: Option[Duration], sameSite: Option[SameSite]): Response

Converts the cookie to a response cookie, using the specified values only if this cookie is a request cookie.

Converts the cookie to a response cookie, using the specified values only if this cookie is a request cookie.

Attributes

Inherited from:
Cookie

Converts the cookie to a response cookie, using, if necessary, default values for all the parameters of a response cookie.

Converts the cookie to a response cookie, using, if necessary, default values for all the parameters of a response cookie.

Attributes

Inherited from:
Cookie