dormouse-client-0.1.0.1: Simple, type-safe and testable HTTP client
Safe HaskellSafe-Inferred
LanguageHaskell2010

Dormouse.Client.Headers.MediaType

Synopsis

Documentation

data MediaType Source #

A Media Type indicates the format of content which can be transferred over the wire

Constructors

MediaType 

Fields

Instances

Instances details
Eq MediaType Source # 
Instance details

Defined in Dormouse.Client.Headers.MediaType

Show MediaType Source # 
Instance details

Defined in Dormouse.Client.Headers.MediaType

data MediaTypeException Source #

MediaTypeException is used to indicate an error parsing a MediaType header such as "Content-Type" into a valid MediaType

parseMediaType :: MonadThrow m => ByteString -> m MediaType Source #

Parse a Media Type from an ASCII ByteString

encodeMediaType :: MediaType -> ByteString Source #

Encode a Media Type as an ASCII ByteString

applicationJson :: MediaType Source #

The application/json Media Type

applicationXWWWFormUrlEncoded :: MediaType Source #

The application/x-www-form-urlencoded Media Type

textHtml :: MediaType Source #

The text/html Media Type