Module
Erl.Cowboy.Handlers.Simple
- Package
- erl-cowboy
- Repository
- purerl/purescript-erl-cowboy
Types and helpers for a cowboy_handler "Plain HTTP handler" callback module
#InitResult Source
data InitResult :: Type -> Type
#InitHandler Source
type InitHandler c s = EffectFn2 Req c (InitResult s)
#initResult Source
initResult :: forall a. a -> Req -> InitResult a
#TerminateHandler Source
type TerminateHandler s = EffectFn3 TerminateReason Req s TerminateResult
#CowboyHandlerBehaviour Source
type CowboyHandlerBehaviour = Behaviour "cowboy_handler"
#cowboyHandlerBehaviour Source
cowboyHandlerBehaviour :: forall a s. { init :: InitHandler a s } -> CowboyHandlerBehaviour
A simple cowboy_handler behaviour. A terminate callback is optional.
Re-exports from Erl.Cowboy.Handlers.Common
#TerminateResult Source
data TerminateResult :: Type