webcrank-wai-0.2.1: Build a WAI Application from Webcrank Resources

Safe HaskellNone
LanguageHaskell98

Webcrank.Wai

Synopsis

Documentation

data WaiCrankT m a Source

Monad transformer that all resource functions will run in. Provides the ability to read the WAI Request inside resource functions.

dispatch Source

Arguments

:: (Applicative m, MonadIO m, MonadCatch m) 
=> (forall a. m a -> IO a)

run

-> ByteString

base uri

-> Dispatcher (WaiResource m) 
-> Application 

Function for turning Dispatchers into Applications. A run function must be provided for executing the application logic. In the simplest case, where m is IO, this can just be id.

class HasRequest s a | s -> a where Source

Methods

request :: Lens' s a Source

class HasRequestDate s a | s -> a where Source

Methods

requestDate :: Lens' s a Source

data WaiData m Source

Holds the request and resource state during request processing.

data ReqData :: *

Container used to keep track of the decision state and what is known about response while processing a request.

module Webcrank