happstack-server-0.4.1: Web related tools and services.Source codeContentsIndex
Happstack.Server.Cookie
Synopsis
data Cookie = Cookie {
cookieVersion :: String
cookiePath :: String
cookieDomain :: String
cookieName :: String
cookieValue :: String
secure :: Bool
}
mkCookie :: String -> String -> Cookie
mkCookieHeader :: Seconds -> Cookie -> String
getCookies :: Monad m => ByteString -> m [Cookie]
getCookie :: Monad m => String -> ByteString -> m Cookie
getCookies' :: Monad m => ByteString -> m (Either String [Cookie])
getCookie' :: Monad m => String -> ByteString -> m (Either String Cookie)
parseCookies :: String -> Either String [Cookie]
cookiesParser :: GenParser Char st [Cookie]
Documentation
data Cookie Source
Constructors
Cookie
cookieVersion :: String
cookiePath :: String
cookieDomain :: String
cookieName :: String
cookieValue :: String
secure :: Bool
show/hide Instances
mkCookie :: String -> String -> CookieSource
Creates a cookie with a default version of 1 and path of /
mkCookieHeader :: Seconds -> Cookie -> StringSource
Set a Cookie in the Result. The values are escaped as per RFC 2109, but some browsers may have buggy support for cookies containing e.g. '"' or ' '.
getCookies :: Monad m => ByteString -> m [Cookie]Source
Get all cookies from the HTTP request. The cookies are ordered per RFC from the most specific to the least specific. Multiple cookies with the same name are allowed to exist.
getCookie :: Monad m => String -> ByteString -> m CookieSource
Get the most specific cookie with the given name. Fails if there is no such cookie or if the browser did not escape cookies in a proper fashion. Browser support for escaping cookies properly is very diverse.
getCookies' :: Monad m => ByteString -> m (Either String [Cookie])Source
getCookie' :: Monad m => String -> ByteString -> m (Either String Cookie)Source
parseCookies :: String -> Either String [Cookie]Source
Not an supported api. Takes a cookie header and returns either a String error message or an array of parsed cookies
cookiesParser :: GenParser Char st [Cookie]Source
not a supported api. A parser for RFC 2109 cookies
Produced by Haddock version 2.6.1