Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- cookieAppliesToUri
- cookieCopy
- cookieDomainMatches
- cookieEqual
- cookieFree
- cookieGetDomain
- cookieGetExpires
- cookieGetHttpOnly
- cookieGetName
- cookieGetPath
- cookieGetSecure
- cookieGetValue
- cookieNew
- cookieParse
- cookieSetDomain
- cookieSetExpires
- cookieSetHttpOnly
- cookieSetMaxAge
- cookieSetName
- cookieSetPath
- cookieSetSecure
- cookieSetValue
- cookieToCookieHeader
- cookieToSetCookieHeader
- Properties
An HTTP cookie.
name and
value will be set for all cookies. If the cookie is
generated from a string that appears to have no name, then @name
will be the empty string.
domain and
path give the host or domain, and path within that
host/domain, to restrict this cookie to. If domain starts with
".", that indicates a domain (which matches the string after the
".", or any hostname that has
domain as a suffix). Otherwise, it
is a hostname and must match exactly.
expires will be non-%NULL if the cookie uses either the original
"expires" attribute, or the newer "max-age" attribute. If
expires
is %NULL, it indicates that neither "expires" nor "max-age" was
specified, and the cookie expires at the end of the session.
If @http_only is set, the cookie should not be exposed to untrusted code (eg, javascript), so as to minimize the danger posed by cross-site scripting attacks.
- newtype Cookie = Cookie (ForeignPtr Cookie)
- newZeroCookie :: MonadIO m => m Cookie
- noCookie :: Maybe Cookie
- data CookieAppliesToUriMethodInfo
- cookieAppliesToUri :: MonadIO m => Cookie -> URI -> m Bool
- data CookieCopyMethodInfo
- cookieCopy :: MonadIO m => Cookie -> m Cookie
- data CookieDomainMatchesMethodInfo
- cookieDomainMatches :: MonadIO m => Cookie -> Text -> m Bool
- data CookieEqualMethodInfo
- cookieEqual :: MonadIO m => Cookie -> Cookie -> m Bool
- data CookieFreeMethodInfo
- cookieFree :: MonadIO m => Cookie -> m ()
- data CookieGetDomainMethodInfo
- cookieGetDomain :: MonadIO m => Cookie -> m Text
- data CookieGetExpiresMethodInfo
- cookieGetExpires :: MonadIO m => Cookie -> m Date
- data CookieGetHttpOnlyMethodInfo
- cookieGetHttpOnly :: MonadIO m => Cookie -> m Bool
- data CookieGetNameMethodInfo
- cookieGetName :: MonadIO m => Cookie -> m Text
- data CookieGetPathMethodInfo
- cookieGetPath :: MonadIO m => Cookie -> m Text
- data CookieGetSecureMethodInfo
- cookieGetSecure :: MonadIO m => Cookie -> m Bool
- data CookieGetValueMethodInfo
- cookieGetValue :: MonadIO m => Cookie -> m Text
- cookieNew :: MonadIO m => Text -> Text -> Text -> Text -> Int32 -> m Cookie
- cookieParse :: MonadIO m => Text -> URI -> m (Maybe Cookie)
- data CookieSetDomainMethodInfo
- cookieSetDomain :: MonadIO m => Cookie -> Text -> m ()
- data CookieSetExpiresMethodInfo
- cookieSetExpires :: MonadIO m => Cookie -> Date -> m ()
- data CookieSetHttpOnlyMethodInfo
- cookieSetHttpOnly :: MonadIO m => Cookie -> Bool -> m ()
- data CookieSetMaxAgeMethodInfo
- cookieSetMaxAge :: MonadIO m => Cookie -> Int32 -> m ()
- data CookieSetNameMethodInfo
- cookieSetName :: MonadIO m => Cookie -> Text -> m ()
- data CookieSetPathMethodInfo
- cookieSetPath :: MonadIO m => Cookie -> Text -> m ()
- data CookieSetSecureMethodInfo
- cookieSetSecure :: MonadIO m => Cookie -> Bool -> m ()
- data CookieSetValueMethodInfo
- cookieSetValue :: MonadIO m => Cookie -> Text -> m ()
- data CookieToCookieHeaderMethodInfo
- cookieToCookieHeader :: MonadIO m => Cookie -> m Text
- data CookieToSetCookieHeaderMethodInfo
- cookieToSetCookieHeader :: MonadIO m => Cookie -> m Text
- cookieClearDomain :: MonadIO m => Cookie -> m ()
- cookieDomain :: AttrLabelProxy "domain"
- cookieReadDomain :: MonadIO m => Cookie -> m (Maybe Text)
- cookieWriteDomain :: MonadIO m => Cookie -> CString -> m ()
- cookieClearExpires :: MonadIO m => Cookie -> m ()
- cookieExpires :: AttrLabelProxy "expires"
- cookieReadExpires :: MonadIO m => Cookie -> m (Maybe Date)
- cookieWriteExpires :: MonadIO m => Cookie -> Ptr Date -> m ()
- cookieHttpOnly :: AttrLabelProxy "httpOnly"
- cookieReadHttpOnly :: MonadIO m => Cookie -> m Bool
- cookieWriteHttpOnly :: MonadIO m => Cookie -> Bool -> m ()
- cookieClearName :: MonadIO m => Cookie -> m ()
- cookieName :: AttrLabelProxy "name"
- cookieReadName :: MonadIO m => Cookie -> m (Maybe Text)
- cookieWriteName :: MonadIO m => Cookie -> CString -> m ()
- cookieClearPath :: MonadIO m => Cookie -> m ()
- cookiePath :: AttrLabelProxy "path"
- cookieReadPath :: MonadIO m => Cookie -> m (Maybe Text)
- cookieWritePath :: MonadIO m => Cookie -> CString -> m ()
- cookieReadSecure :: MonadIO m => Cookie -> m Bool
- cookieSecure :: AttrLabelProxy "secure"
- cookieWriteSecure :: MonadIO m => Cookie -> Bool -> m ()
- cookieClearValue :: MonadIO m => Cookie -> m ()
- cookieReadValue :: MonadIO m => Cookie -> m (Maybe Text)
- cookieValue :: AttrLabelProxy "value"
- cookieWriteValue :: MonadIO m => Cookie -> CString -> m ()
Exported types
newZeroCookie :: MonadIO m => m Cookie Source
Construct a Cookie
struct initialized to zero.
Methods
cookieAppliesToUri
data CookieAppliesToUriMethodInfo Source
((~) * signature (URI -> m Bool), MonadIO m) => MethodInfo * CookieAppliesToUriMethodInfo Cookie signature |
cookieCopy
data CookieCopyMethodInfo Source
((~) * signature (m Cookie), MonadIO m) => MethodInfo * CookieCopyMethodInfo Cookie signature |
cookieCopy :: MonadIO m => Cookie -> m Cookie Source
cookieDomainMatches
data CookieDomainMatchesMethodInfo Source
((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * CookieDomainMatchesMethodInfo Cookie signature |
cookieEqual
data CookieEqualMethodInfo Source
((~) * signature (Cookie -> m Bool), MonadIO m) => MethodInfo * CookieEqualMethodInfo Cookie signature |
cookieFree
data CookieFreeMethodInfo Source
((~) * signature (m ()), MonadIO m) => MethodInfo * CookieFreeMethodInfo Cookie signature |
cookieFree :: MonadIO m => Cookie -> m () Source
cookieGetDomain
data CookieGetDomainMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieGetDomainMethodInfo Cookie signature |
cookieGetDomain :: MonadIO m => Cookie -> m Text Source
cookieGetExpires
data CookieGetExpiresMethodInfo Source
((~) * signature (m Date), MonadIO m) => MethodInfo * CookieGetExpiresMethodInfo Cookie signature |
cookieGetExpires :: MonadIO m => Cookie -> m Date Source
cookieGetHttpOnly
data CookieGetHttpOnlyMethodInfo Source
((~) * signature (m Bool), MonadIO m) => MethodInfo * CookieGetHttpOnlyMethodInfo Cookie signature |
cookieGetHttpOnly :: MonadIO m => Cookie -> m Bool Source
cookieGetName
data CookieGetNameMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieGetNameMethodInfo Cookie signature |
cookieGetName :: MonadIO m => Cookie -> m Text Source
cookieGetPath
data CookieGetPathMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieGetPathMethodInfo Cookie signature |
cookieGetPath :: MonadIO m => Cookie -> m Text Source
cookieGetSecure
data CookieGetSecureMethodInfo Source
((~) * signature (m Bool), MonadIO m) => MethodInfo * CookieGetSecureMethodInfo Cookie signature |
cookieGetSecure :: MonadIO m => Cookie -> m Bool Source
cookieGetValue
data CookieGetValueMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieGetValueMethodInfo Cookie signature |
cookieGetValue :: MonadIO m => Cookie -> m Text Source
cookieNew
cookieParse
cookieSetDomain
data CookieSetDomainMethodInfo Source
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * CookieSetDomainMethodInfo Cookie signature |
cookieSetDomain :: MonadIO m => Cookie -> Text -> m () Source
cookieSetExpires
data CookieSetExpiresMethodInfo Source
((~) * signature (Date -> m ()), MonadIO m) => MethodInfo * CookieSetExpiresMethodInfo Cookie signature |
cookieSetExpires :: MonadIO m => Cookie -> Date -> m () Source
cookieSetHttpOnly
data CookieSetHttpOnlyMethodInfo Source
((~) * signature (Bool -> m ()), MonadIO m) => MethodInfo * CookieSetHttpOnlyMethodInfo Cookie signature |
cookieSetHttpOnly :: MonadIO m => Cookie -> Bool -> m () Source
cookieSetMaxAge
data CookieSetMaxAgeMethodInfo Source
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * CookieSetMaxAgeMethodInfo Cookie signature |
cookieSetMaxAge :: MonadIO m => Cookie -> Int32 -> m () Source
cookieSetName
data CookieSetNameMethodInfo Source
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * CookieSetNameMethodInfo Cookie signature |
cookieSetName :: MonadIO m => Cookie -> Text -> m () Source
cookieSetPath
data CookieSetPathMethodInfo Source
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * CookieSetPathMethodInfo Cookie signature |
cookieSetPath :: MonadIO m => Cookie -> Text -> m () Source
cookieSetSecure
data CookieSetSecureMethodInfo Source
((~) * signature (Bool -> m ()), MonadIO m) => MethodInfo * CookieSetSecureMethodInfo Cookie signature |
cookieSetSecure :: MonadIO m => Cookie -> Bool -> m () Source
cookieSetValue
data CookieSetValueMethodInfo Source
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * CookieSetValueMethodInfo Cookie signature |
cookieSetValue :: MonadIO m => Cookie -> Text -> m () Source
cookieToCookieHeader
data CookieToCookieHeaderMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieToCookieHeaderMethodInfo Cookie signature |
cookieToCookieHeader :: MonadIO m => Cookie -> m Text Source
cookieToSetCookieHeader
data CookieToSetCookieHeaderMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * CookieToSetCookieHeaderMethodInfo Cookie signature |
cookieToSetCookieHeader :: MonadIO m => Cookie -> m Text Source
Properties
Domain
cookieClearDomain :: MonadIO m => Cookie -> m () Source
cookieDomain :: AttrLabelProxy "domain" Source
cookieWriteDomain :: MonadIO m => Cookie -> CString -> m () Source
Expires
cookieClearExpires :: MonadIO m => Cookie -> m () Source
cookieExpires :: AttrLabelProxy "expires" Source
HttpOnly
cookieHttpOnly :: AttrLabelProxy "httpOnly" Source
cookieReadHttpOnly :: MonadIO m => Cookie -> m Bool Source
cookieWriteHttpOnly :: MonadIO m => Cookie -> Bool -> m () Source
Name
cookieClearName :: MonadIO m => Cookie -> m () Source
cookieName :: AttrLabelProxy "name" Source
cookieWriteName :: MonadIO m => Cookie -> CString -> m () Source
Path
cookieClearPath :: MonadIO m => Cookie -> m () Source
cookiePath :: AttrLabelProxy "path" Source
cookieWritePath :: MonadIO m => Cookie -> CString -> m () Source
Secure
cookieReadSecure :: MonadIO m => Cookie -> m Bool Source
cookieSecure :: AttrLabelProxy "secure" Source
cookieWriteSecure :: MonadIO m => Cookie -> Bool -> m () Source
Value
cookieClearValue :: MonadIO m => Cookie -> m () Source
cookieValue :: AttrLabelProxy "value" Source
cookieWriteValue :: MonadIO m => Cookie -> CString -> m () Source