Module

HTTPure.Contrib.Biscotti

#middleware

middleware :: forall m a. MonadAff m => EncodeJson a => DecodeJson a => String -> SessionStore a -> (Maybe a -> Request -> m (Tuple Response (Maybe a))) -> Request -> m Response

Create an HTTPure middleware for sesion handling. Requires the name of your cookie and a Biscotti.Session.SessionStore

launchAff_ do
  store <- liftEffect $ Session.memoryStore "_test"
  let middleware = Biscotti.middleware "_test" store

#middleware'

middleware' :: forall m a. MonadAff m => EncodeJson a => DecodeJson a => String -> SessionStore a -> ErrorHandler m -> CookieUpdater m -> (Maybe a -> Request -> m (Tuple Response (Maybe a))) -> Request -> m Response

Modules