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

Safe Haskell | Safe-Inferred
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
  - renderHeader :: h -> ByteString

# Documentation

class RenderHeader h where Source #

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.

Methods

renderHeader :: h -> ByteString Source #

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

#### Instances

Instances details

RenderHeader ByteString Source # |
Instance details Defined in Network.HTTP.Media.RenderHeader Methods renderHeader :: ByteString -> ByteString Source #
RenderHeader Charset Source # |
Instance details Defined in Network.HTTP.Media.Charset.Internal Methods renderHeader :: Charset -> ByteString Source #
RenderHeader Encoding Source # |
Instance details Defined in Network.HTTP.Media.Encoding.Internal Methods renderHeader :: Encoding -> ByteString Source #
RenderHeader Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods renderHeader :: Language -> ByteString Source #
RenderHeader MediaType Source # |
Instance details Defined in Network.HTTP.Media.MediaType.Internal Methods renderHeader :: MediaType -> ByteString Source #
RenderHeader h => RenderHeader (Quality h) Source # |
Instance details Defined in Network.HTTP.Media.Quality Methods renderHeader :: Quality h -> ByteString Source #
RenderHeader h => RenderHeader [h] Source # |
Instance details Defined in Network.HTTP.Media.RenderHeader Methods renderHeader :: [h] -> ByteString Source #