Web.Encodings.MimeHeader
Description
Functions for parsing MIME headers (Key: value; k1=v1; k2=v2)
- type Header a = (a, a, SomeMap a)
- parseHeader :: StringLike a => a -> Header a
- lookupHeader :: (StringLike s, Failure (HeaderNotFound s) m, Eq s, Monad m) => s -> [Header s] -> m s
- lookupHeaderAttr :: (Failure (AttributeNotFound s) m, StringLike s, Eq s, Monad m) => 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, 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
data AttributeNotFound s Source
Constructors
AttributeNotFound s s |
Instances
Typeable1 AttributeNotFound | |
Show s => Show (AttributeNotFound s) | |
(Typeable s, Show s) => Exception (AttributeNotFound s) |
data HeaderNotFound s Source
Constructors
HeaderNotFound s |
Instances
Typeable1 HeaderNotFound | |
Show s => Show (HeaderNotFound s) | |
(Show s, Typeable s) => Exception (HeaderNotFound s) |