Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Route = Socket -> HTTPRequest -> (ByteString -> Maybe ByteString) -> IO ()
- match :: ByteString -> Matcher
- prefix :: ByteString -> Matcher
- route :: [(Matcher, Route)] -> Handler
- useHandler :: Handler -> Route
Documentation
type Route = Socket -> HTTPRequest -> (ByteString -> Maybe ByteString) -> IO () Source
match :: ByteString -> Matcher Source
Create a matchable template with parameters (:param)
prefix :: ByteString -> Matcher Source
Create a prefix matcher
Router function Takes a list of routes and iterates through them for every requeust
useHandler :: Handler -> Route Source
Wrap a handler in a route Lets you use a handler (no parameters) as a route