Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- body :: forall ct a m. (Decode ct a, MonadIO m, MonadThrow m) => Endpoint m a
- bodyMaybe :: forall ct a m. (Decode ct a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a)
- jsonBody :: (Decode ApplicationJson a, MonadIO m, MonadThrow m) => Endpoint m a
- jsonBodyMaybe :: (Decode ApplicationJson a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a)
- textBody :: (Decode TextPlain a, MonadIO m, MonadThrow m) => Endpoint m a
- textBodyMaybe :: (Decode TextPlain a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a)
Documentation
body :: forall ct a m. (Decode ct a, MonadIO m, MonadThrow m) => Endpoint m a Source #
Endpoint that tries to decode body of request into some type a
using corresponding Decode
instance.
Matches if body isn't chunked. May throw an exception in case:
- Body is empty
- There was a body decoding error
bodyMaybe :: forall ct a m. (Decode ct a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a) Source #
Endpoint that tries to decode body of request into some type a
using corresponding Decode
instance.
Matches if body isn't chunked. May throw an exception in case:
- There was a body decoding error
jsonBody :: (Decode ApplicationJson a, MonadIO m, MonadThrow m) => Endpoint m a Source #
Alias for body @ApplicationJson
jsonBodyMaybe :: (Decode ApplicationJson a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a) Source #
Alias for bodyMaybe @ApplicationJson
textBody :: (Decode TextPlain a, MonadIO m, MonadThrow m) => Endpoint m a Source #
Alias for body @TextPlain
textBodyMaybe :: (Decode TextPlain a, MonadIO m, MonadThrow m) => Endpoint m (Maybe a) Source #
Alias for bodyMaybe @TextPlain