-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple web framework inspired by scotty. -- @package apiary @version 0.1.0.0 module Control.Monad.Apiary.Filter method :: Monad m => Method -> ApiaryT c m a -> ApiaryT c m a stdMethod :: Monad m => StdMethod -> ApiaryT c m a -> ApiaryT c m a -- | filter by rootPattern of ApiaryConfig. root :: Monad m => ApiaryT c m b -> ApiaryT c m b ssl :: Monad m => ApiaryT c m a -> ApiaryT c m a hasQuery :: Monad m => ByteString -> ApiaryT c m a -> ApiaryT c m a -- | raw filter function. function :: Monad m => (c -> Request -> Maybe c') -> ApiaryT c' m a -> ApiaryT c m a function' :: Monad m => (Request -> Bool) -> ApiaryT c m a -> ApiaryT c m a -- | HTTP standard method (as defined by RFC 2616, and PATCH which is -- defined by RFC 5789). data StdMethod :: * GET :: StdMethod POST :: StdMethod HEAD :: StdMethod PUT :: StdMethod DELETE :: StdMethod TRACE :: StdMethod CONNECT :: StdMethod OPTIONS :: StdMethod PATCH :: StdMethod module Control.Monad.Apiary.Action data ActionT m a type ApplicationM m = Request -> m Response data ApiaryConfig m ApiaryConfig :: ApplicationM m -> Status -> ResponseHeaders -> [ByteString] -> (FilePath -> ByteString) -> ApiaryConfig m -- | call when no handler matched. notFound :: ApiaryConfig m -> ApplicationM m -- | used unless call status function. defaultStatus :: ApiaryConfig m -> Status -- | initial headers. defaultHeader :: ApiaryConfig m -> ResponseHeaders -- | used by root filter. rootPattern :: ApiaryConfig m -> [ByteString] mimeType :: ApiaryConfig m -> FilePath -> ByteString getRequest :: Monad m => ActionT m Request status :: Monad m => Status -> ActionT m () addHeader :: Monad m => Header -> ActionT m () setHeaders :: Monad m => ResponseHeaders -> ActionT m () modifyHeader :: Monad m => (ResponseHeaders -> ResponseHeaders) -> ActionT m () contentType :: Monad m => ByteString -> ActionT m () -- | set body to file content and detect Content-Type by extension. file :: Monad m => FilePath -> Maybe FilePart -> ActionT m () file' :: Monad m => FilePath -> Maybe FilePart -> ActionT m () builder :: Monad m => Builder -> ActionT m () lbs :: Monad m => ByteString -> ActionT m () source :: Monad m => Source IO (Flush Builder) -> ActionT m () -- | set body to j and set Content-Type to "application/json" json :: (ToJSON j, Monad m) => j -> ActionT m () -- | The default value for this type. def :: Default a => a module Control.Monad.Apiary data ApiaryT c m a runApiaryT :: Monad m => ApiaryConfig m -> ApiaryT () m a -> ApplicationM m apiaryConfig :: Monad m => ApiaryT c m (ApiaryConfig m) action :: Monad m => (c -> ActionT m ()) -> ApiaryT c m () action_ :: Monad m => ActionT m () -> ApiaryT c m () module Web.Apiary.QQ capture :: QuasiQuoter module Web.Apiary