-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple web framework inspired by scotty. -- @package apiary @version 0.3.2.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 data ApiaryConfig ApiaryConfig :: Application -> Status -> ResponseHeaders -> [ByteString] -> (FilePath -> ByteString) -> ApiaryConfig -- | call when no handler matched. notFound :: ApiaryConfig -> Application -- | used unless call status function. defaultStatus :: ApiaryConfig -> Status -- | initial headers. defaultHeader :: ApiaryConfig -> ResponseHeaders -- | used by root filter. rootPattern :: ApiaryConfig -> [ByteString] mimeType :: ApiaryConfig -> FilePath -> ByteString getRequest :: Monad m => ActionT m Request getQuery :: Monad m => ByteString -> ActionT m (Maybe (Maybe ByteString)) -- | when query parameter is not found, mzero(pass next handler). getQuery' :: Monad m => ByteString -> ActionT m (Maybe ByteString) getRequestHeader :: Monad m => HeaderName -> ActionT m (Maybe ByteString) -- | when request header is not found, mzero(pass next handler). getRequestHeader' :: Monad m => HeaderName -> ActionT m ByteString status :: Monad m => Status -> ActionT m () addHeader :: Monad m => HeaderName -> ByteString -> 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 () -- | The default value for this type. def :: Default a => a module Control.Monad.Apiary data ApiaryT c m a type Apiary c = ApiaryT c IO runApiary :: ApiaryConfig -> Apiary () a -> Application runApiaryT :: Monad m => ApiaryConfig -> (forall x. m x -> IO x) -> ApiaryT () m a -> Application apiaryConfig :: ApiaryT c m ApiaryConfig action :: Monad m => (c -> ActionT m ()) -> ApiaryT c m () action_ :: Monad m => ActionT m () -> ApiaryT c m () module Web.Apiary.TH capture :: QuasiQuoter module Web.Apiary