linnet-0.1.0.1: Lightweight library for building HTTP API

Safe HaskellNone
LanguageHaskell2010

Linnet.Endpoints.Cookies

Synopsis

Documentation

cookie :: forall a m. (DecodeEntity a, MonadThrow m) => ByteString -> Endpoint m a Source #

Endpoint that tries to decode cookie name from a request. Always matches, but may throw an exception in case:

  • Cookie is not presented in the request
  • There was a cookie decoding error

cookieMaybe :: forall a m. (DecodeEntity a, MonadThrow m) => ByteString -> Endpoint m (Maybe a) Source #

Endpoint that tries to decode cookie name from a request. Always matches, but may throw an exception in case:

  • There was a cookie decoding error