apiary-0.3.1.0: Simple web framework inspired by scotty.

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Apiary.Action

Contents

Synopsis

Documentation

data ApiaryConfig Source

Constructors

ApiaryConfig 

Fields

notFound :: Application

call when no handler matched.

defaultStatus :: Status

used unless call status function.

defaultHeader :: ResponseHeaders

initial headers.

rootPattern :: [ByteString]

used by root filter.

mimeType :: FilePath -> ByteString
 

actions

getter

getQuery' :: Monad m => ByteString -> ActionT m (Maybe ByteString) Source

when query parameter is not found, mzero(pass next handler).

getRequestHeader' :: Monad m => HeaderName -> ActionT m ByteString Source

when request header is not found, mzero(pass next handler).

setter

status :: Monad m => Status -> ActionT m () Source

response header

response body

file :: Monad m => FilePath -> Maybe FilePart -> ActionT m () Source

set body to file content and detect Content-Type by extension.

Reexport

def :: Default a => a

The default value for this type.