bdcs-api-0.1.3: BDCS API Server

Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

Documentation

data TOML Source #

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

Methods

mimeRender :: Proxy TOML a -> a -> ByteString

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

class ToTOML a where Source #

toTOML needs to be implemented for the type being converted. See BDCS.API.Recipe for an example.

Minimal complete definition

toTOML

Methods

toTOML :: a -> ByteString Source #

Instances

class FromTOML a where Source #

parseTOML needs to be implemented for the type being converted. See BDCS.API.Recipe for an example.

Minimal complete definition

parseTOML