License | BSD3 |
---|---|
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data JSON
- data PlainText
- class Accept ctype where
- contentType :: Proxy ctype -> MediaType
- class Accept a => Encode a c where
- class Accept c => Decode c a where
- decode :: Proxy c -> ByteString -> Either String a
- class FromText a where
- class ToText a where
- class Encodings ctypes a where
- class Decodings ctypes a where
Predefined Content Types.
Type representing content type of application/json
.
Type representing content type of text/plain
.
Creating custom Content Types.
class Accept ctype where Source
Singleton class for content type.
contentType :: Proxy ctype -> MediaType Source