Cookie
Discover the framework-neutral cookie returned by the storage.
A framework-neutral representation of a cookie to set on the response, returned when you read the session cookies. It carries every field a response target needs, so you can map it onto your frameworkâs response without losing information.
Looking for something specific?
Use the search bar at the top of the page or press / to quickly search through the documentation.
Use the summary below to quickly jump to a specific topic:
| Page | Description |
|---|---|
| Constructor | Learn how to initialize a cookie. |
| getName | Learn how to read the cookie name. |
| getValue | Learn how to read the cookie value. |
| getExpiration | Learn how to read the cookie expiration time. |
| getPath | Learn how to read the cookie path. |
| getDomain | Learn how to read the cookie domain. |
| isSecure | Learn how to check whether the cookie is sent only over HTTPS. |
| isHttpOnly | Learn how to check whether the cookie is hidden from client-side scripts. |
| getSameSite | Learn how to read the cookie SameSite policy. |
| toSetCookieHeader | Learn how to render the cookie as a Set-Cookie header value. |