Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Handler m = [(ByteString, ByteString)] -> Request -> (Response -> m ResponseReceived) -> m ResponseReceived
- route :: Monad m => [(ByteString, Handler m)] -> Request -> (Response -> m ResponseReceived) -> m ResponseReceived
Documentation
= [(ByteString, ByteString)] | The captured path parameters. |
-> Request | The matched |
-> (Response -> m ResponseReceived) | The continuation. |
-> m ResponseReceived |
A Handler
is a generalized Application
that receives the captured
path parameters as its first argument.
route :: Monad m => [(ByteString, Handler m)] -> Request -> (Response -> m ResponseReceived) -> m ResponseReceived Source #
Routes requests to Handler
s according to a routing table.