web-encodings-0.3.0.2: Encapsulate multiple web encoding in a single package.

Web.Encodings.MimeHeader

Description

Functions for parsing MIME headers (Key: value; k1=v1; k2=v2)

Synopsis

Documentation

type Header a = (a, a, SomeMap a)Source

A single MIME header. type Header = (B8.ByteString, B8.ByteString, BSMap)

parseHeader :: StringLike a => a -> Header aSource

Parse a header line in the format:

Name: value; attkey=attval; attkey2=attval2.

lookupHeader :: (StringLike s, Failure (HeaderNotFound s) m, Eq s, Monad m) => s -> [Header s] -> m sSource

lookupHeaderAttr :: (Failure (AttributeNotFound s) m, StringLike s, Eq s, Monad m) => s -> s -> [Header s] -> m sSource