web-encodings-0.2.5: Encapsulate multiple web encoding in a single package.Source codeContentsIndex
Web.Encodings.MimeHeader
Description
Functions for parsing MIME headers (Key: value; k1=v1; k2=v2)
Synopsis
type Header a = (a, a, SomeMap a)
parseHeader :: StringLike a => a -> Header a
lookupHeader :: (StringLike s, MonadFailure (HeaderNotFound s) m, Eq s) => s -> [Header s] -> m s
lookupHeaderAttr :: (MonadFailure (AttributeNotFound s) m, StringLike s, Eq s) => s -> s -> [Header s] -> m s
data AttributeNotFound s = AttributeNotFound s s
data HeaderNotFound s = HeaderNotFound s
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, MonadFailure (HeaderNotFound s) m, Eq s) => s -> [Header s] -> m sSource
lookupHeaderAttr :: (MonadFailure (AttributeNotFound s) m, StringLike s, Eq s) => s -> s -> [Header s] -> m sSource
data AttributeNotFound s Source
Constructors
AttributeNotFound s s
show/hide Instances
data HeaderNotFound s Source
Constructors
HeaderNotFound s
show/hide Instances
Produced by Haddock version 2.6.1