Safe Haskell | None |
---|---|
Language | Haskell2010 |
BDCS.API.TOMLMediaType
Description
Implement a ContentType for TOML
so that POSTing text/x-toml with Servant will parse it.
Add [TOML] to the Servant API to enable handling of it. See BDCS.API.V0 for an example.
Documentation
Used in the Servant ReqBody
Instances
Accept * TOML Source # | Use Content-Type: text/x-toml |
ToTOML a => MimeRender * TOML a Source # | mimeRender is what Servant uses to connect its handling of ContentType to the actual parsing into the destination type |
FromTOML a => MimeUnrender * TOML a Source # | mimeUnrender is what Servant uses to connect its handling of ContentType to the actual parsing into the destination type |
toTOML needs to be implemented for the type being converted. See BDCS.API.Recipe for an example.
Minimal complete definition
Methods
toTOML :: a -> ByteString Source #