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
Members list
In this article