SetCookie -package:HTTP

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.
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.
Trait for a cookie in HTTP responses
Set the cookie on the client.
Set a cookie, with full access to its options (see SetCookie)
Set a cookie.
Set a cookie. If the cookie path is not specified, it will default to "/". Likewise, if the domain is omitted, it will default to the current page's domain.
Set a cookie value in a response. Example usage:
response' <- setCookie @"name" -< (response, cookie)
save a single datatype to a specific key in the session
Deprecated: instance exists in http-api-data-0.3.9. This module will be removed in next major release.
The domain for which the cookie should be sent. Default value: Nothing (The browser defaults to the current domain).
The time at which to expire the cookie. Default value: Nothing (The browser will default to expiring a cookie when the browser is closed).
Marks the cookie as "HTTP only", i.e. not accessible from Javascript. Default value: False
The maximum time to keep the cookie, in seconds. Default value: Nothing (The browser defaults to expiring a cookie when the browser is closed).
The name of the cookie. Default value: "name"
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 "same site" policy of the cookie, i.e. whether it should be sent with cross-site requests. Default value: Nothing
Instructs the browser to only send the cookie over HTTPS. Default value: False
The value of the cookie. Default value: "value"
Cookies marked Partitioned are double-keyed: by the origin that sets them and the origin of the top-level page. Default value: False