Provides a parsed version of the raw W.Request
data.
- type RequestBodyContents = ([(Text, Text)], [(Text, FileInfo)])
- data Request = Request {
- reqGetParams :: [(Text, Text)]
- reqCookies :: [(Text, Text)]
- reqWaiRequest :: Request
- reqLangs :: [Text]
- reqNonce :: Maybe Text
- data FileInfo = FileInfo {}
- languages :: Monad mo => GGHandler s m mo [Text]
- lookupGetParam :: Monad mo => Text -> GGHandler s m mo (Maybe Text)
- lookupPostParam :: Text -> GHandler s m (Maybe Text)
- lookupCookie :: Monad mo => Text -> GGHandler s m mo (Maybe Text)
- lookupFile :: Text -> GHandler s m (Maybe FileInfo)
- lookupGetParams :: Monad mo => Text -> GGHandler s m mo [Text]
- lookupPostParams :: Text -> GHandler s m [Text]
- lookupCookies :: Monad mo => Text -> GGHandler s m mo [Text]
- lookupFiles :: Text -> GHandler s m [FileInfo]
Request datatype
type RequestBodyContents = ([(Text, Text)], [(Text, FileInfo)])Source
A tuple containing both the POST parameters and submitted files.
The parsed request information.
Request | |
|
FileInfo | |
|
Convenience functions
languages :: Monad mo => GGHandler s m mo [Text]Source
Get the list of supported languages supplied by the user.
Languages are determined based on the following three (in descending order of preference):
- The _LANG get parameter.
- The _LANG cookie.
- The _LANG user session variable.
- Accept-Language HTTP header.
This is handled by parseWaiRequest (not exposed).
Lookup parameters
Multi-lookup
lookupPostParams :: Text -> GHandler s m [Text]Source
Lookup for POST parameters.
lookupFiles :: Text -> GHandler s m [FileInfo]Source
Lookup for POSTed files.