|
|
|
| Description |
| URL dispatcher
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data URLConf |
| URL dispatcher config
| | Constructors | | Action HttpAction | Simple answer, not depending on URL
| | OneOf URLConf URLConf | Try to dispatch URL with first URLConf, if error then try second
| | Function StrAction | Answer depends on last URL part (basename)
| | Prefix String URLConf | URLConf is executed only when URL starts with given prefix
| | Regexp String URLConf | URLConf is executed only when current part of URL matches regexp
| | RegexpFun String StrAction | Same, but answer depends on URL part
| | ManyRegexpFun URLParts URLParts ManyStrAction | Answer depends on many URL parts (which should match regexps)
| After URLConf URLConf -- ^ Execute first URLConf, then second.
| | RawFunction StaticAction | Execute StaticAction without connecting to DB or anything else
|
| Instances | |
|
|
| runURLConf |
|
|
| type StrAction = String -> HttpController |
| Function which get one String argument and (maybe) returns Response
|
|
| type StaticAction = HttpRequest -> String -> StaticController |
| Function which get request and one String argument and returns Response
|
|
| type ManyStrAction = URLParts -> HttpController |
| Function which get many String arguments and (maybe) returns Response
|
|
| type HttpAction = HttpController |
| Function which just returns Response
|
|
| (-->) :: String -> HttpAction -> URLConf |
| If current part of URL is equal to given string, then call given function
|
|
| (//) :: String -> URLConf -> URLConf |
| If current part of URL is equal to given string, then work with given URLConf
|
|
| (-\>) :: String -> StrAction -> URLConf |
| If current part of URL matches given string, then run function
|
|
| (~>) :: String -> StrAction -> URLConf |
| Same as RegexpFun
|
|
| (~/) :: String -> URLConf -> URLConf |
| Forms ManyRegexpFun
|
|
| (~>>) :: String -> ManyStrAction -> URLConf |
| Ends form ManyRegexpFun
|
|
| (<|>) :: URLConf -> URLConf -> URLConf |
| Same as OneOf
|
|
| myUrl :: HttpRequest -> String |
| Get URL from Request
|
|
| Produced by Haddock version 2.4.2 |