ResponseCookie

zio.http.ResponseCookie
final case class ResponseCookie(name: String, value: String, expires: Option[String] = ..., domain: Option[String] = ..., path: Option[Path] = ..., maxAge: Option[Long] = ..., isSecure: Boolean = ..., isHttpOnly: Boolean = ..., sameSite: Option[SameSite] = ..., isPartitioned: Boolean = ..., priority: Option[CookiePriority] = ...)

Cookie emitted in a Set-Cookie response header.

The expires field is rendered verbatim as the Expires attribute and is expected to already be in the HTTP-date format used by RFC 6265, such as Wed, 21 Oct 2026 07:28:00 GMT. The priority field maps to the non-RFC but commonly used Priority attribute, and isPartitioned maps to the Partitioned attribute. Rendering validates the cookie name and unquoted cookie value and rejects SameSite=None unless Secure is also set.

Attributes

Source
Cookie.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala