/usr/share/doc/libghc-cookie-doc/html/cookie.txt is in libghc-cookie-doc 0.4.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | HTTP cookie parsing and rendering
--
-- Hackage documentation generation is not reliable. For up to date
-- documentation, please see:
-- <a>https://www.stackage.org/package/cookie</a>.
@package cookie
@version 0.4.3
module Web.Cookie
-- | Data type representing the key-value pair to use for a cookie, as well
-- as configuration options for it.
--
-- <h4>Creating a SetCookie</h4>
--
-- <a>SetCookie</a> does not export a constructor; instead, use
-- <a>defaultSetCookie</a> and override values (see
-- <a>http://www.yesodweb.com/book/settings-types</a> for details):
--
-- <pre>
-- import Web.Cookie
-- :set -XOverloadedStrings
-- let cookie = <a>defaultSetCookie</a> { <a>setCookieName</a> = "cookieName", <a>setCookieValue</a> = "cookieValue" }
-- </pre>
--
-- <h4>Cookie Configuration</h4>
--
-- Cookies have several configuration options; a brief summary of each
-- option is given below. For more information, see <a>RFC 6265</a> or
-- <a>Wikipedia</a>.
data SetCookie
-- | The name of the cookie. Default value: <tt>"name"</tt>
setCookieName :: SetCookie -> ByteString
-- | The value of the cookie. Default value: <tt>"value"</tt>
setCookieValue :: SetCookie -> ByteString
-- | The URL path for which the cookie should be sent. Default value:
-- <tt>Nothing</tt> (The browser defaults to the path of the request that
-- sets the cookie).
setCookiePath :: SetCookie -> Maybe ByteString
-- | The time at which to expire the cookie. Default value:
-- <tt>Nothing</tt> (The browser will default to expiring a cookie when
-- the browser is closed).
setCookieExpires :: SetCookie -> Maybe UTCTime
-- | The maximum time to keep the cookie, in seconds. Default value:
-- <tt>Nothing</tt> (The browser defaults to expiring a cookie when the
-- browser is closed).
setCookieMaxAge :: SetCookie -> Maybe DiffTime
-- | The domain for which the cookie should be sent. Default value:
-- <tt>Nothing</tt> (The browser defaults to the current domain).
setCookieDomain :: SetCookie -> Maybe ByteString
-- | Marks the cookie as "HTTP only", i.e. not accessible from Javascript.
-- Default value: <tt>False</tt>
setCookieHttpOnly :: SetCookie -> Bool
-- | Instructs the browser to only send the cookie over HTTPS. Default
-- value: <tt>False</tt>
setCookieSecure :: SetCookie -> Bool
-- | Marks the cookie as "same site", i.e. should not be sent with
-- cross-site requests. Default value: <tt>Nothing</tt>
setCookieSameSite :: SetCookie -> Maybe SameSiteOption
-- | Data type representing the options for a SameSite cookie
data SameSiteOption
sameSiteLax :: SameSiteOption
sameSiteStrict :: SameSiteOption
parseSetCookie :: ByteString -> SetCookie
renderSetCookie :: SetCookie -> Builder
-- | A minimal <a>SetCookie</a>. All fields are <a>Nothing</a> or
-- <a>False</a> except <tt><a>setCookieName</a> = "name"</tt> and
-- <tt><a>setCookieValue</a> = "value"</tt>. You need this to construct a
-- <a>SetCookie</a>, because it does not export a constructor.
-- Equivalently, you may use <a>def</a>.
defaultSetCookie :: SetCookie
-- | The default value for this type.
def :: Default a => a
type Cookies = [(ByteString, ByteString)]
-- | Decode the value of a "Cookie" request header into key/value pairs.
parseCookies :: ByteString -> Cookies
renderCookies :: Cookies -> Builder
-- | Textual cookies. Functions assume UTF8 encoding.
type CookiesText = [(Text, Text)]
parseCookiesText :: ByteString -> CookiesText
renderCookiesText :: CookiesText -> Builder
expiresFormat :: String
-- | Format a <a>UTCTime</a> for a cookie.
formatCookieExpires :: UTCTime -> ByteString
parseCookieExpires :: ByteString -> Maybe UTCTime
instance GHC.Show.Show Web.Cookie.SetCookie
instance GHC.Classes.Eq Web.Cookie.SetCookie
instance GHC.Classes.Eq Web.Cookie.SameSiteOption
instance GHC.Show.Show Web.Cookie.SameSiteOption
instance Control.DeepSeq.NFData Web.Cookie.SameSiteOption
instance Control.DeepSeq.NFData Web.Cookie.SetCookie
instance Data.Default.Class.Default Web.Cookie.SetCookie
|