Module

Hyper.Cookies

Package
purescript-hyper
Repository
owickstrom/hyper

#cookies Source

cookies :: forall c res req m. Monad m => Request req m => Middleware m (Conn req res { cookies :: Unit | c }) (Conn req res { cookies :: Either String (Object Values) | c }) Unit

#CookieAttributes Source

type CookieAttributes = { comment :: Maybe String, domain :: Maybe String, expires :: Maybe JSDate, httpOnly :: Boolean, maxAge :: Maybe MaxAge, path :: Maybe String, sameSite :: Maybe SameSite, secure :: Boolean }

#SameSite Source

data SameSite

Constructors

#Name Source

type Name = String

#MaxAge Source

newtype MaxAge

Instances

#setCookie Source

setCookie :: forall b c res req m. Monad m => Response res m b => Name -> Value -> CookieAttributes -> Middleware m (Conn req (res HeadersOpen) c) (Conn req (res HeadersOpen) c) Unit

#Value Source

type Value = String