Network.HTTP.Media.RenderHeader

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 #

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 #

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

#### Instances

Instances details

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