apiary-0.1.0.0: Simple web framework inspired by scotty.

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Apiary.Action

Contents

Synopsis

Documentation

data ApiaryConfig m Source

Constructors

ApiaryConfig 

Fields

notFound :: ApplicationM m

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
 

Instances

actions

getter

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.

json :: (ToJSON j, Monad m) => j -> ActionT m () Source

set body to j and set Content-Type to "application/json"

Reexport

def :: Default a => a

The default value for this type.