webgear-core-1.2.0: Composable, type-safe library to build HTTP APIs
Safe HaskellSafe-Inferred
LanguageHaskell2010

WebGear.Core.MIMETypes

Description

MIME types for HTTP bodies

Synopsis

Documentation

class MIMEType mt where Source #

MIME types used in the Accept and Content-Type headers

Methods

mimeType :: mt -> MediaType Source #

Instances

Instances details
MIMEType FormURLEncoded Source # 
Instance details

Defined in WebGear.Core.MIMETypes

MIMEType HTML Source # 
Instance details

Defined in WebGear.Core.MIMETypes

MIMEType JSON Source # 
Instance details

Defined in WebGear.Core.MIMETypes

MIMEType OctetStream Source # 
Instance details

Defined in WebGear.Core.MIMETypes

MIMEType PlainText Source # 
Instance details

Defined in WebGear.Core.MIMETypes

MIMEType (FormData a) Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data FormURLEncoded Source #

The application/x-www-form-urlencoded MIME type

Constructors

FormURLEncoded 

Instances

Instances details
MIMEType FormURLEncoded Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data HTML Source #

The text/html MIME type

Constructors

HTML 

Instances

Instances details
MIMEType HTML Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data JSON Source #

A JSON MIME type with customizable media type

Constructors

JSONMedia Text

JSON with a specific media type

JSON

application/json media type

Instances

Instances details
MIMEType JSON Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data FormData a Source #

The multipart/form-data MIME type

Instances

Instances details
MIMEType (FormData a) Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data FormDataResult a Source #

Result of parsing a multipart/form-data body from a request. The body can contain both parameters and files.

Constructors

FormDataResult 

Fields

data OctetStream Source #

The application/octet-stream MIME type

Constructors

OctetStream 

Instances

Instances details
MIMEType OctetStream Source # 
Instance details

Defined in WebGear.Core.MIMETypes

data PlainText Source #

The text/plain MIME type

Constructors

PlainText 

Instances

Instances details
MIMEType PlainText Source # 
Instance details

Defined in WebGear.Core.MIMETypes