| Portability | non-portable | 
|---|---|
| Stability | experimental | 
| Maintainer | Anders Kaseorg <andersk@mit.edu> | 
| Safe Haskell | Safe-Inferred | 
Network.Multipart.Header
Description
Parsing of HTTP headers (name, value pairs) Partly based on code from WASHMail.
- type Headers = [(HeaderName, String)]
- newtype HeaderName = HeaderName String
- class  HeaderValue a  where- parseHeaderValue :: Parser a
- prettyHeaderValue :: a -> String
 
- pHeaders :: Parser Headers
- data ContentType = ContentType {}
- getContentType :: Monad m => Headers -> m ContentType
- parseContentType :: Monad m => String -> m ContentType
- showContentType :: ContentType -> String
- data ContentTransferEncoding = ContentTransferEncoding String
- getContentTransferEncoding :: Monad m => Headers -> m ContentTransferEncoding
- data ContentDisposition = ContentDisposition String [(String, String)]
- getContentDisposition :: Monad m => Headers -> m ContentDisposition
- parseM :: Monad m => Parser a -> SourceName -> String -> m a
- caseInsensitiveEq :: String -> String -> Bool
- caseInsensitiveCompare :: String -> String -> Ordering
- lexeme :: Parser a -> Parser a
- ws1 :: Parser Char
- p_token :: Parser String
Headers
type Headers = [(HeaderName, String)]Source
HTTP headers.
newtype HeaderName Source
A string with case insensitive equality and comparisons.
Constructors
| HeaderName String | 
Instances
class HeaderValue a whereSource
Content-type
data ContentType Source
A MIME media type value.
   The Show instance is derived automatically.
   Use showContentType to obtain the standard
   string representation.
   See http://www.ietf.org/rfc/rfc2046.txt for more
   information about MIME media types.
Constructors
| ContentType | |
| Fields 
 | |
getContentType :: Monad m => Headers -> m ContentTypeSource
parseContentType :: Monad m => String -> m ContentTypeSource
Parse the standard representation of a content-type.
   If the input cannot be parsed, this function calls
   fail with a (hopefully) informative error message.
Content-transfer-encoding
data ContentTransferEncoding Source
Constructors
| ContentTransferEncoding String | 
Content-disposition
data ContentDisposition Source
Constructors
| ContentDisposition String [(String, String)] | 
getContentDisposition :: Monad m => Headers -> m ContentDispositionSource
Utilities
caseInsensitiveEq :: String -> String -> BoolSource
caseInsensitiveCompare :: String -> String -> OrderingSource