servant-xml-1.0.0: Servant support for the XML Content-Type

Copyright(c) Colin Woodbury 2018
LicenseBSD3
MaintainerColin Woodbury <colingw@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Servant.XML

Description

Servant support for XML.

Types with a ToXml instance will be automatically marshalled into XML and successfully returned by Servant endpoints. In implementing toXml, you can use the element and text primatives found in the xmlbf library.

Synopsis

Documentation

data XML Source #

The application/xml Content-Type. To be used in Servant endpoints like:

data Foo = ...

instance ToXml Foo where
  toXml foo = ...

type API = ... :<|> "foo" :> Get '[XML] Foo

Instances