Safe Haskell | None |
---|---|
Language | Haskell2010 |
Trasa.Extra
Synopsis
- class IsRoute route where
- link :: IsRoute route => Concealed route -> Url
- encodeRoute :: IsRoute route => Concealed route -> Text
- decodeRoute :: IsRoute route => Router route -> Text -> Maybe (Concealed route)
- redirect :: IsRoute route => Prepared route response -> ByteString -> TrasaT IO a
- getHeader :: CI ByteString -> TrasaT IO (Maybe Text)
- currentHeader :: CI ByteString -> TrasaT IO (Maybe Text)
- setHeader :: CI ByteString -> Text -> TrasaT IO ()
- getCookies :: TrasaT IO (Maybe Cookies)
- lookupCookie :: ByteString -> TrasaT IO (Maybe ByteString)
- setCookie :: SetCookie -> TrasaT IO ()
- pathPieceCodec :: PathPiece piece => CaptureCodec piece
- bodyAeson :: (ToJSON a, FromJSON a) => BodyCodec a
- aeson :: (ToJSON a, FromJSON a) => CaptureCodec a
- decodeInt :: Text -> Maybe Int
- err404 :: Monad m => TrasaT m a
Route Functions
Header Functions
currentHeader :: CI ByteString -> TrasaT IO (Maybe Text) Source #
lookupCookie :: ByteString -> TrasaT IO (Maybe ByteString) Source #
Codecs and Parsing
pathPieceCodec :: PathPiece piece => CaptureCodec piece Source #