Safe Haskell | Safe-Infered |
---|
Defines the Action
monad which abstracts some of the details of handling
HTTP requests with IterIO.
- type Action t m a = StateT (HttpReq t, HttpResp m, [Param]) m a
- data Param = Param {
- paramKey :: ByteString
- paramValue :: ByteString
- paramHeaders :: [(ByteString, ByteString)]
- routeAction :: Monad m => Action t m () -> HttpRoute m t
- routeActionPattern :: Monad m => String -> Action t m () -> HttpRoute m t
- params :: Monad m => Action t m [Param]
- param :: Monad m => ByteString -> Action t m (Maybe Param)
- getHttpReq :: Monad m => Action t m (HttpReq t)
- setSession :: Monad m => String -> Action t m ()
- destroySession :: Monad m => Action t m ()
- requestHeader :: Monad m => ByteString -> Action t m (Maybe ByteString)
Documentation
A request parameter from a form field in the HTTP body
Param | |
|
setSession :: Monad m => String -> Action t m ()Source
Sets a the value for "_sess" in the cookie to the given string.
destroySession :: Monad m => Action t m ()Source
Removes the "_sess" key-value pair from the cookie.
requestHeader :: Monad m => ByteString -> Action t m (Maybe ByteString)Source
Returns the value of an Http Header from the request if it exists otherwise
Nothing