Module HTTP/MediaType

This module is undocumented. This is a list of its definitions.

APPLICATION_ATOM_XML_TYPE :: MediaType

The media type application/atom+xml.

APPLICATION_FORM_URLENCODED_TYPE :: MediaType

The media type application/x-www-form-urlencoded, which is how a Form is sent.

APPLICATION_JSON_TYPE :: MediaType

The media type application/json.

APPLICATION_OCTET_STREAM_TYPE :: MediaType

The media type application/octet-stream, that is, arbitrary bytes.

APPLICATION_SVG_XML_TYPE :: MediaType

The media type application/svg+xml.

APPLICATION_XHTML_XML_TYPE :: MediaType

The media type application/xhtml+xml.

APPLICATION_XML_TYPE :: MediaType

The media type application/xml.

MULTIPART_FORM_DATA_TYPE :: MediaType

The media type multipart/form-data, which is how a MultiPart body is sent.

TEXT_HTML_TYPE :: MediaType

The media type text/html.

TEXT_PLAIN_TYPE :: MediaType

The media type text/plain.

TEXT_XML_TYPE :: MediaType

The media type text/xml.

WILDCARD_TYPE :: MediaType

The wildcard media type */*, which matches any type.

mediaType :: String -> MediaType

Parses a media type from its textual form, for example application/json or text/plain;charset=utf-8. Fails if the string is not a well formed media type.

withCharset :: MediaType -> String -> <Proc> MediaType

A copy of the media type with its charset parameter set to the given character set name, for example utf-8. Any charset the media type already had is replaced.