Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ReqBody (cts :: [Type]) a = ReqBody a
- class DecodeBody cts a where
- decodeBody :: (MonadIO m, MonadThrow m) => MakeError -> ByteString -> IO ByteString -> m (ReqBody cts a)
- class Decode ct a where
- decode :: ByteString -> Either Text a
- reqBody :: forall cts r m i ts. Introspection i Request (ReqBody cts r) => (MonadIO m, MonadThrow m) => DecodeBody cts r => ValueCombinator i (WithReq m (ReqBody cts r)) ts m
Documentation
newtype ReqBody (cts :: [Type]) a Source #
ReqBody a |
Instances
IsRequest (ReqBody cts a) Source # | |
Defined in Web.Minion.Request.Body type RequestValue (ReqBody cts a) Source # getRequestValue :: ReqBody cts a -> RequestValue (ReqBody cts a) Source # | |
type RequestValue (ReqBody cts a) Source # | |
Defined in Web.Minion.Request.Body |
class DecodeBody cts a where Source #
:: (MonadIO m, MonadThrow m) | |
=> MakeError | |
-> ByteString | Content-Type header value |
-> IO ByteString | Request body |
-> m (ReqBody cts a) |
Instances
DecodeBody ('[] :: [Type]) a Source # | |
Defined in Web.Minion.Request.Body decodeBody :: (MonadIO m, MonadThrow m) => MakeError -> ByteString -> IO ByteString -> m (ReqBody '[] a) Source # | |
(ContentType ct, Decode ct a, DecodeBody cts a) => DecodeBody (ct ': cts) a Source # | |
Defined in Web.Minion.Request.Body decodeBody :: (MonadIO m, MonadThrow m) => MakeError -> ByteString -> IO ByteString -> m (ReqBody (ct ': cts) a) Source # |
class Decode ct a where Source #
Instances
FromForm a => Decode FormUrlEncoded a Source # | |
Defined in Web.Minion.Request.Body | |
FromJSON a => Decode Json a Source # | |
Defined in Web.Minion.Media.Json | |
Decode PlainText Text Source # | |
Defined in Web.Minion.Request.Body | |
Decode PlainText Text Source # | |
Defined in Web.Minion.Request.Body | |
Decode PlainText String Source # | |
Defined in Web.Minion.Request.Body |
:: forall cts r m i ts. Introspection i Request (ReqBody cts r) | |
=> (MonadIO m, MonadThrow m) | |
=> DecodeBody cts r | |
=> ValueCombinator i (WithReq m (ReqBody cts r)) ts m | . |
Extracts request body with specified Content-Type
.../>
reqBody
@'[PlainText] @MyRequest