http-media-0.8.0.0: Processing HTTP Content-Type and Accept headers
Safe Haskell Safe-Inferred
Language Haskell2010

Network.HTTP.Media.MediaType

Description

Defines the MediaType accept header with an Accept instance for use in content-type negotiation.

Synopsis

Type and creation

data MediaType Source #

An HTTP media type, consisting of the type, subtype, and parameters.

Instances

Instances details
Eq MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

Ord MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

Show MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

IsString MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

Accept MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

RenderHeader MediaType Source #
Instance details

Defined in Network.HTTP.Media.MediaType.Internal

(//) :: ByteString -> ByteString -> MediaType Source #

Builds a MediaType without parameters. Can produce an error if either type is invalid.

(/:) :: MediaType -> ( ByteString , ByteString ) -> MediaType Source #

Adds a parameter to a MediaType . Can produce an error if either string is invalid.

Querying

(/?) :: MediaType -> ByteString -> Bool Source #

Evaluates if a MediaType has a parameter of the given name.