Module

Type.Trout.ContentType

Package
purescript-trout
Repository
owickstrom/purescript-trout

#HasMediaType Source

class HasMediaType ct  where

Associates a media type to a Trout content type.

Members

#MimeRender Source

class MimeRender a ct b | a -> b, ct -> b where

Renders a value of type a, as appropriate for content type ct, as a value of type b.

Members

#MimeParse Source

class MimeParse b ct a | b -> a, ct -> b where

Parses a value of type a, as appropriate for content type ct, from a value of type b.

Members

#AllMimeRender Source

class AllMimeRender a cts b | a -> b, cts -> b where

Renders a value of type a, as appropriate for each content type in cts, as a non-empty list of values of type b, corresponding to the content types. Content types can be a single type, e.g. HTML, or multiple types separated by :<|>, e.g. (HTML :<|> JSON).

This is used to support content negotiation.

Members

Instances