HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecookie-0.5.1Haskell2010

Web.Cookie

  • 4 types
  • 25 values
  • Packagecookie-0.5.1
  • Exports30
  • LanguageHaskell2010
  • LicenceMIT
  • SourceCookie.hs

Server to client

0 declarations

Data type

datadata SetCookie
#

Data type representing the key-value pair to use for a cookie, as well as configuration options for it.

Creating a SetCookie

SetCookie does not export a constructor; instead, use defaultSetCookie and override values (see http://www.yesodweb.com/book/settings-types for details):

import Web.Cookie
:set -XOverloadedStrings
let cookie = defaultSetCookie { setCookieName = "cookieName", setCookieValue = "cookieValue" }
Cookie Configuration

Cookies have several configuration options; a brief summary of each option is given below. For more information, see RFC 6265 or Wikipedia.

Instances4Eq, Show, NFData, Default

The URL path for which the cookie should be sent. Default value: Nothing (The browser defaults to the path of the request that sets the cookie).

The time at which to expire the cookie. Default value: Nothing (The browser will default to expiring a cookie when the browser is closed).

The maximum time to keep the cookie, in seconds. Default value: Nothing (The browser defaults to expiring a cookie when the browser is closed).

Cookies marked Partitioned are double-keyed: by the origin that sets them and the origin of the top-level page. Default value: False

Directs the browser to not send the cookie for any cross-site request, including e.g. a user clicking a link in their email to open a page on your site.

Functions

methoddef :: a
#

The default value for this type.

Client to server

4 declarations

UTF8 Version

Expires field

3 declarations