| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Web.Firefly.Types
- type App a = ReaderT ReqContext (ExceptT Response IO) a
 - type Handler a = ReaderT ReqContext IO a
 - runHandler :: Handler r -> App r
 - type Pattern = Text
 - type Route = Text
 - type HeaderMap = Map (CI Text) [Text]
 - type MultiQueryMap = Map Text [Text]
 - type QueryMap = Map Text Text
 - type ContentType = Text
 - data ReqContext = ReqContext {
- requestBody :: Text
 - request :: Request
 
 
Documentation
type App a = ReaderT ReqContext (ExceptT Response IO) a Source #
The main application definition monad, sequence your route handlers and/or middleware in this monad
type Handler a = ReaderT ReqContext IO a Source #
Handler is an alias for App, currently provided for semantic reasons,
 but the two may diverge in the future.
runHandler :: Handler r -> App r Source #
Runs a handler within an App WITHOUT rendering the response
type HeaderMap = Map (CI Text) [Text] Source #
A map of case insensitive header names to all provided values for that header.
type MultiQueryMap = Map Text [Text] Source #
A map of query parameter names to all values provided for that parameter
type QueryMap = Map Text Text Source #
A map of query parameter names to the last-provided value for that parameter
type ContentType = Text Source #
A request or response's Content-Type value
data ReqContext Source #
Context provided when handling any request
Constructors
| ReqContext | |
Fields 
  | |