Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data ContentType a Source #
ContentType | |
|
json :: (FromJSON a, ToJSON a, Applicative f) => f (ContentType a) Source #
data WithHeaders a Source #
addHeaders :: RequestHeaders -> a -> WithHeaders a Source #
withHeaders :: Functor f => f (ContentType a) -> f (ContentType (WithHeaders a)) Source #
acceptHeader :: NonEmpty (ContentType a) -> Header Source #
contentTypeHeader :: ContentType a -> Header Source #
collectMediaTypes :: (ContentType a -> MediaType -> b) -> NonEmpty (ContentType a) -> [b] Source #
chooseAcceptCType :: NonEmpty (ContentType a) -> ByteString -> Maybe (MediaType, a -> (RequestHeaders, ByteString)) Source #
chooseContentCType :: NonEmpty (ContentType a) -> RequestHeaders -> ByteString -> Maybe (ByteString -> Either Text a) Source #