http-media-0.7.1: Processing HTTP Content-Type and Accept headers

Safe Haskell | Safe
Language | Haskell2010

Network.HTTP.Media.RenderHeader

Description

Defines the `RenderHeader` type class, with the `renderHeader` method. `renderHeader` can be used to render basic header values (acting as identity on `ByteString`s), but it will also work on lists of quality values, which provides the necessary interface for rendering the full possibilities of Accept headers.

Synopsis

- class RenderHeader h where

# Documentation

class RenderHeader h where #

A class for header values, so they may be rendered to their `ByteString` representation. Lists of header values and quality-marked header values will render appropriately.

Minimal complete definition

renderHeader

Methods

renderHeader :: h -> ByteString #

Render a header value to a UTF-8 `ByteString`.

Instances

RenderHeader ByteString # |
Methods renderHeader :: ByteString -> ByteString #
RenderHeader Language # |
Methods renderHeader :: Language -> ByteString #
RenderHeader MediaType # |
Methods renderHeader :: MediaType -> ByteString #
RenderHeader h => RenderHeader [h] # |
Methods renderHeader :: [h] -> ByteString #
RenderHeader h => RenderHeader (Quality h) # |
Methods renderHeader :: Quality h -> ByteString #