web-encodings-0.2.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.

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