swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe Haskell | None
Language | Haskell2010

SwaggerPetstore.MimeTypes

Contents

- Consumes Class
- Produces Class
- Default Mime Types
- MimeType Class
- MimeRender Class
- MimeUnrender Class

Description

Synopsis

- class MimeType mtype => Consumes req mtype
- class MimeType mtype => Produces req mtype
- data MimeJSON = MimeJSON
- data MimeXML = MimeXML
- data MimePlainText = MimePlainText
- data MimeFormUrlEncoded = MimeFormUrlEncoded
- data MimeMultipartFormData = MimeMultipartFormData
- data MimeOctetStream = MimeOctetStream
- data MimeNoContent = MimeNoContent
- data MimeAny = MimeAny
- data NoContent = NoContent
- class Typeable mtype => MimeType mtype where
- class MimeType mtype => MimeRender mtype x where
- mimeRenderDefaultMultipartFormData :: ToHttpApiData a => a -> ByteString
- class MimeType mtype => MimeUnrender mtype o where

# Consumes Class

class MimeType mtype => Consumes req mtype Source #

Instances

Consumes UploadFile MimeMultipartFormData Source # |
    multipart/form-data
Consumes UpdatePetWithForm MimeFormUrlEncoded Source # |
    application/x-www-form-urlencoded
Consumes UpdatePet MimeXML Source # |
    application/xml
Consumes UpdatePet MimeJSON Source # |
    application/json
Consumes AddPet MimeXML Source # |
    application/xml
Consumes AddPet MimeJSON Source # |
    application/json
Consumes TestClassname MimeJSON Source # |
    application/json
Consumes TestJsonFormData MimeJSON Source # |
    application/json
Consumes TestEnumParameters MimeAny Source # |
    */*
Consumes TestEndpointParameters MimeXmlCharsetutf8 Source # |
    application/xml; charset=utf-8
Consumes TestEndpointParameters MimeJsonCharsetutf8 Source # |
    application/json; charset=utf-8
Consumes TestClientModel MimeJSON Source # |
    application/json
Consumes TestSpecialTags MimeJSON Source # |
    application/json

# Produces Class

class MimeType mtype => Produces req mtype Source #

Instances

Produces UpdateUser MimeXML Source # |
    application/xml
Produces UpdateUser MimeJSON Source # |
    application/json
Produces LogoutUser MimeXML Source # |
    application/xml
Produces LogoutUser MimeJSON Source # |
    application/json
Produces LoginUser MimeXML Source # |
    application/xml
Produces LoginUser MimeJSON Source # |
    application/json
Produces GetUserByName MimeXML Source # |
    application/xml
Produces GetUserByName MimeJSON Source # |
    application/json
Produces DeleteUser MimeXML Source # |
    application/xml
Produces DeleteUser MimeJSON Source # |
    application/json
Produces CreateUsersWithListInput MimeXML Source # |
    application/xml
Produces CreateUsersWithListInput MimeJSON Source # |
    application/json
Produces CreateUsersWithArrayInput MimeXML Source # |
    application/xml
Produces CreateUsersWithArrayInput MimeJSON Source # |
    application/json
Produces CreateUser MimeXML Source # |
    application/xml
Produces CreateUser MimeJSON Source # |
    application/json
Produces PlaceOrder MimeXML Source # |
    application/xml
Produces PlaceOrder MimeJSON Source # |
    application/json
Produces GetOrderById MimeXML Source # |
    application/xml
Produces GetOrderById MimeJSON Source # |
    application/json
Produces GetInventory MimeJSON Source # |
    application/json
Produces DeleteOrder MimeXML Source # |
    application/xml
Produces DeleteOrder MimeJSON Source # |
    application/json
Produces UploadFile MimeJSON Source # |
    application/json
Produces UpdatePetWithForm MimeXML Source # |
    application/xml
Produces UpdatePetWithForm MimeJSON Source # |
    application/json
Produces UpdatePet MimeXML Source # |
    application/xml
Produces UpdatePet MimeJSON Source # |
    application/json
Produces GetPetById MimeXML Source # |
    application/xml
Produces GetPetById MimeJSON Source # |
    application/json
Produces FindPetsByTags MimeXML Source # |
    application/xml
Produces FindPetsByTags MimeJSON Source # |
    application/json
Produces FindPetsByStatus MimeXML Source # |
    application/xml
Produces FindPetsByStatus MimeJSON Source # |
    application/json
Produces DeletePet MimeXML Source # |
    application/xml
Produces DeletePet MimeJSON Source # |
    application/json
Produces AddPet MimeXML Source # |
    application/xml
Produces AddPet MimeJSON Source # |
    application/json
Produces TestClassname MimeJSON Source # |
    application/json
Produces TestEnumParameters MimeAny Source # |
    */*
Produces TestEndpointParameters MimeXmlCharsetutf8 Source # |
    application/xml; charset=utf-8
Produces TestEndpointParameters MimeJsonCharsetutf8 Source # |
    application/json; charset=utf-8
Produces TestClientModel MimeJSON Source # |
    application/json
Produces TestSpecialTags MimeJSON Source # |
    application/json

# Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON |

Instances

MimeType MimeJSON Source # |
    application/json; charset=utf-8
Methods mimeTypes :: Proxy * MimeJSON -> [MediaType] Source # mimeType :: Proxy * MimeJSON -> Maybe MediaType Source # mimeType' :: MimeJSON -> Maybe MediaType Source # mimeTypes' :: MimeJSON -> [MediaType] Source #
FromJSON a => MimeUnrender MimeJSON a Source # |
    A.eitherDecode
Methods mimeUnrender :: Proxy * MimeJSON -> ByteString -> Either String a Source # mimeUnrender' :: MimeJSON -> ByteString -> Either String a Source #
ToJSON a => MimeRender MimeJSON a Source # | `encode`
Methods mimeRender :: Proxy * MimeJSON -> a -> ByteString Source # mimeRender' :: MimeJSON -> a -> ByteString Source #
Produces UpdateUser MimeJSON Source # |
    application/json
Produces LogoutUser MimeJSON Source # |
    application/json
Produces LoginUser MimeJSON Source # |
    application/json
Produces GetUserByName MimeJSON Source # |
    application/json
Produces DeleteUser MimeJSON Source # |
    application/json
Produces CreateUsersWithListInput MimeJSON Source # |
    application/json
Produces CreateUsersWithArrayInput MimeJSON Source # |
    application/json
Produces CreateUser MimeJSON Source # |
    application/json
Produces PlaceOrder MimeJSON Source # |
    application/json
Produces GetOrderById MimeJSON Source # |
    application/json
Produces GetInventory MimeJSON Source # |
    application/json
Produces DeleteOrder MimeJSON Source # |
    application/json
Produces UploadFile MimeJSON Source # |
    application/json
Produces UpdatePetWithForm MimeJSON Source # |
    application/json
Produces UpdatePet MimeJSON Source # |
    application/json
Produces GetPetById MimeJSON Source # |
    application/json
Produces FindPetsByTags MimeJSON Source # |
    application/json
Produces FindPetsByStatus MimeJSON Source # |
    application/json
Produces DeletePet MimeJSON Source # |
    application/json
Produces AddPet MimeJSON Source # |
    application/json
Produces TestClassname MimeJSON Source # |
    application/json
Produces TestClientModel MimeJSON Source # |
    application/json
Produces TestSpecialTags MimeJSON Source # |
    application/json
Consumes UpdatePet MimeJSON Source # |
    application/json
Consumes AddPet MimeJSON Source # |
    application/json
Consumes TestClassname MimeJSON Source # |
    application/json
Consumes TestJsonFormData MimeJSON Source # |
    application/json
Consumes TestClientModel MimeJSON Source # |
    application/json
Consumes TestSpecialTags MimeJSON Source # |
    application/json

data MimeXML Source #

Constructors

MimeXML |

Instances

MimeType MimeXML Source # |
    application/xml; charset=utf-8
Methods mimeTypes :: Proxy * MimeXML -> [MediaType] Source # mimeType :: Proxy * MimeXML -> Maybe MediaType Source # mimeType' :: MimeXML -> Maybe MediaType Source # mimeTypes' :: MimeXML -> [MediaType] Source #
Produces UpdateUser MimeXML Source # |
    application/xml
Produces LogoutUser MimeXML Source # |
    application/xml
Produces LoginUser MimeXML Source # |
    application/xml
Produces GetUserByName MimeXML Source # |
    application/xml
Produces DeleteUser MimeXML Source # |
    application/xml
Produces CreateUsersWithListInput MimeXML Source # |
    application/xml
Produces CreateUsersWithArrayInput MimeXML Source # |
    application/xml
Produces CreateUser MimeXML Source # |
    application/xml
Produces PlaceOrder MimeXML Source # |
    application/xml
Produces GetOrderById MimeXML Source # |
    application/xml
Produces DeleteOrder MimeXML Source # |
    application/xml
Produces UpdatePetWithForm MimeXML Source # |
    application/xml
Produces UpdatePet MimeXML Source # |
    application/xml
Produces GetPetById MimeXML Source # |
    application/xml
Produces FindPetsByTags MimeXML Source # |
    application/xml
Produces FindPetsByStatus MimeXML Source # |
    application/xml
Produces DeletePet MimeXML Source # |
    application/xml
Produces AddPet MimeXML Source # |
    application/xml
Consumes UpdatePet MimeXML Source # |
    application/xml
Consumes AddPet MimeXML Source # |
    application/xml

data MimePlainText Source #

Constructors

MimePlainText |

Instances

MimeType MimePlainText Source # |
    text/plain; charset=utf-8
Methods mimeTypes :: Proxy * MimePlainText -> [MediaType] Source # mimeType :: Proxy * MimePlainText -> Maybe MediaType Source # mimeType' :: MimePlainText -> Maybe MediaType Source # mimeTypes' :: MimePlainText -> [MediaType] Source #
MimeUnrender MimePlainText ByteString Source # |
    P.Right . P.id
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String ByteString Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String ByteString Source #
MimeUnrender MimePlainText String Source # |
    P.Right . BCL.unpack
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String String Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String String Source #
MimeUnrender MimePlainText Text Source # |
    P.left P.show . TL.decodeUtf8'
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String Text Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String Text Source #
MimeRender MimePlainText ByteString Source # |
    P.id
Methods mimeRender :: Proxy * MimePlainText -> ByteString -> ByteString Source # mimeRender' :: MimePlainText -> ByteString -> ByteString Source #
MimeRender MimePlainText String Source # |
    BCL.pack
Methods mimeRender :: Proxy * MimePlainText -> String -> ByteString Source # mimeRender' :: MimePlainText -> String -> ByteString Source #
MimeRender MimePlainText Text Source # |
    BL.fromStrict . T.encodeUtf8
Methods mimeRender :: Proxy * MimePlainText -> Text -> ByteString Source # mimeRender' :: MimePlainText -> Text -> ByteString Source #

data MimeFormUrlEncoded Source #

Constructors

MimeFormUrlEncoded |

Instances

MimeType MimeFormUrlEncoded Source # |
    application/x-www-form-urlencoded
Methods mimeTypes :: Proxy * MimeFormUrlEncoded -> [MediaType] Source # mimeType :: Proxy * MimeFormUrlEncoded -> Maybe MediaType Source # mimeType' :: MimeFormUrlEncoded -> Maybe MediaType Source # mimeTypes' :: MimeFormUrlEncoded -> [MediaType] Source #
FromForm a => MimeUnrender MimeFormUrlEncoded a Source # |
    P.left T.unpack . WH.urlDecodeAsForm
Methods mimeUnrender :: Proxy * MimeFormUrlEncoded -> ByteString -> Either String a Source # mimeUnrender' :: MimeFormUrlEncoded -> ByteString -> Either String a Source #
ToForm a => MimeRender MimeFormUrlEncoded a Source # |
    WH.urlEncodeAsForm
Methods mimeRender :: Proxy * MimeFormUrlEncoded -> a -> ByteString Source # mimeRender' :: MimeFormUrlEncoded -> a -> ByteString Source #
Consumes UpdatePetWithForm MimeFormUrlEncoded Source # |
    application/x-www-form-urlencoded

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData |

Instances

MimeType MimeMultipartFormData Source # |
    multipart/form-data
Methods mimeTypes :: Proxy * MimeMultipartFormData -> [MediaType] Source # mimeType :: Proxy * MimeMultipartFormData -> Maybe MediaType Source # mimeType' :: MimeMultipartFormData -> Maybe MediaType Source # mimeTypes' :: MimeMultipartFormData -> [MediaType] Source #
MimeRender MimeMultipartFormData Bool Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Bool -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Bool -> ByteString Source #
MimeRender MimeMultipartFormData Char Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Char -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Char -> ByteString Source #
MimeRender MimeMultipartFormData Double Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Double -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Double -> ByteString Source #
MimeRender MimeMultipartFormData Float Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Float -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Float -> ByteString Source #
MimeRender MimeMultipartFormData Int Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Int -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Int -> ByteString Source #
MimeRender MimeMultipartFormData Integer Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Integer -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Integer -> ByteString Source #
MimeRender MimeMultipartFormData ByteString Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> ByteString -> ByteString Source # mimeRender' :: MimeMultipartFormData -> ByteString -> ByteString Source #
MimeRender MimeMultipartFormData String Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> String -> ByteString Source # mimeRender' :: MimeMultipartFormData -> String -> ByteString Source #
MimeRender MimeMultipartFormData Text Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Text -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Text -> ByteString Source #
MimeRender MimeMultipartFormData Binary Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Binary -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Binary -> ByteString Source #
MimeRender MimeMultipartFormData ByteArray Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> ByteArray -> ByteString Source # mimeRender' :: MimeMultipartFormData -> ByteArray -> ByteString Source #
MimeRender MimeMultipartFormData Date Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Date -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Date -> ByteString Source #
MimeRender MimeMultipartFormData DateTime Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> DateTime -> ByteString Source # mimeRender' :: MimeMultipartFormData -> DateTime -> ByteString Source #
Consumes UploadFile MimeMultipartFormData Source # |
    multipart/form-data

data MimeOctetStream Source #

Constructors

MimeOctetStream |

Instances

MimeType MimeOctetStream Source # |
    application/octet-stream
Methods mimeTypes :: Proxy * MimeOctetStream -> [MediaType] Source # mimeType :: Proxy * MimeOctetStream -> Maybe MediaType Source # mimeType' :: MimeOctetStream -> Maybe MediaType Source # mimeTypes' :: MimeOctetStream -> [MediaType] Source #
MimeUnrender MimeOctetStream ByteString Source # |
    P.Right . P.id
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String ByteString Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String ByteString Source #
MimeUnrender MimeOctetStream String Source # |
    P.Right . BCL.unpack
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String String Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String String Source #
MimeUnrender MimeOctetStream Text Source # |
    P.left P.show . T.decodeUtf8' . BL.toStrict
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String Text Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String Text Source #
MimeRender MimeOctetStream ByteString Source # |
    P.id
Methods mimeRender :: Proxy * MimeOctetStream -> ByteString -> ByteString Source # mimeRender' :: MimeOctetStream -> ByteString -> ByteString Source #
MimeRender MimeOctetStream String Source # |
    BCL.pack
Methods mimeRender :: Proxy * MimeOctetStream -> String -> ByteString Source # mimeRender' :: MimeOctetStream -> String -> ByteString Source #
MimeRender MimeOctetStream Text Source # |
    BL.fromStrict . T.encodeUtf8
Methods mimeRender :: Proxy * MimeOctetStream -> Text -> ByteString Source # mimeRender' :: MimeOctetStream -> Text -> ByteString Source #

data MimeNoContent Source #

Constructors

MimeNoContent |

Instances

MimeType MimeNoContent Source # |
Methods mimeTypes :: Proxy * MimeNoContent -> [MediaType] Source # mimeType :: Proxy * MimeNoContent -> Maybe MediaType Source # mimeType' :: MimeNoContent -> Maybe MediaType Source # mimeTypes' :: MimeNoContent -> [MediaType] Source #
MimeUnrender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeUnrender :: Proxy * MimeNoContent -> ByteString -> Either String NoContent Source # mimeUnrender' :: MimeNoContent -> ByteString -> Either String NoContent Source #
MimeRender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeRender :: Proxy * MimeNoContent -> NoContent -> ByteString Source # mimeRender' :: MimeNoContent -> NoContent -> ByteString Source #

data MimeAny Source #

Constructors

MimeAny |

Instances

MimeType MimeAny Source # |
    "*/*"
Methods mimeTypes :: Proxy * MimeAny -> [MediaType] Source # mimeType :: Proxy * MimeAny -> Maybe MediaType Source # mimeType' :: MimeAny -> Maybe MediaType Source # mimeTypes' :: MimeAny -> [MediaType] Source #
Produces TestEnumParameters MimeAny Source # |
    */*
Consumes TestEnumParameters MimeAny Source # |
    */*

data NoContent Source #

A type for responses without content-body.

Constructors

NoContent |

Instances

Eq NoContent Source # |
Methods (==) :: NoContent -> NoContent -> Bool # (/=) :: NoContent -> NoContent -> Bool #
Show NoContent Source # |
Methods showsPrec :: Int -> NoContent -> ShowS # show :: NoContent -> String # showList :: [NoContent] -> ShowS #
MimeUnrender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeUnrender :: Proxy * MimeNoContent -> ByteString -> Either String NoContent Source # mimeUnrender' :: MimeNoContent -> ByteString -> Either String NoContent Source #
MimeRender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeRender :: Proxy * MimeNoContent -> NoContent -> ByteString Source # mimeRender' :: MimeNoContent -> NoContent -> ByteString Source #

# MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Methods

mimeTypes :: Proxy mtype -> [MediaType] Source #

mimeType :: Proxy mtype -> Maybe MediaType Source #

mimeType' :: mtype -> Maybe MediaType Source #

mimeTypes' :: mtype -> [MediaType] Source #

Instances

MimeType MimeAny Source # |
    "*/*"
Methods mimeTypes :: Proxy * MimeAny -> [MediaType] Source # mimeType :: Proxy * MimeAny -> Maybe MediaType Source # mimeType' :: MimeAny -> Maybe MediaType Source # mimeTypes' :: MimeAny -> [MediaType] Source #
MimeType MimeNoContent Source # |
Methods mimeTypes :: Proxy * MimeNoContent -> [MediaType] Source # mimeType :: Proxy * MimeNoContent -> Maybe MediaType Source # mimeType' :: MimeNoContent -> Maybe MediaType Source # mimeTypes' :: MimeNoContent -> [MediaType] Source #
MimeType MimeOctetStream Source # |
    application/octet-stream
Methods mimeTypes :: Proxy * MimeOctetStream -> [MediaType] Source # mimeType :: Proxy * MimeOctetStream -> Maybe MediaType Source # mimeType' :: MimeOctetStream -> Maybe MediaType Source # mimeTypes' :: MimeOctetStream -> [MediaType] Source #
MimeType MimeMultipartFormData Source # |
    multipart/form-data
Methods mimeTypes :: Proxy * MimeMultipartFormData -> [MediaType] Source # mimeType :: Proxy * MimeMultipartFormData -> Maybe MediaType Source # mimeType' :: MimeMultipartFormData -> Maybe MediaType Source # mimeTypes' :: MimeMultipartFormData -> [MediaType] Source #
MimeType MimeFormUrlEncoded Source # |
    application/x-www-form-urlencoded
Methods mimeTypes :: Proxy * MimeFormUrlEncoded -> [MediaType] Source # mimeType :: Proxy * MimeFormUrlEncoded -> Maybe MediaType Source # mimeType' :: MimeFormUrlEncoded -> Maybe MediaType Source # mimeTypes' :: MimeFormUrlEncoded -> [MediaType] Source #
MimeType MimePlainText Source # |
    text/plain; charset=utf-8
Methods mimeTypes :: Proxy * MimePlainText -> [MediaType] Source # mimeType :: Proxy * MimePlainText -> Maybe MediaType Source # mimeType' :: MimePlainText -> Maybe MediaType Source # mimeTypes' :: MimePlainText -> [MediaType] Source #
MimeType MimeXML Source # |
    application/xml; charset=utf-8
Methods mimeTypes :: Proxy * MimeXML -> [MediaType] Source # mimeType :: Proxy * MimeXML -> Maybe MediaType Source # mimeType' :: MimeXML -> Maybe MediaType Source # mimeTypes' :: MimeXML -> [MediaType] Source #
MimeType MimeJSON Source # |
    application/json; charset=utf-8
Methods mimeTypes :: Proxy * MimeJSON -> [MediaType] Source # mimeType :: Proxy * MimeJSON -> Maybe MediaType Source # mimeType' :: MimeJSON -> Maybe MediaType Source # mimeTypes' :: MimeJSON -> [MediaType] Source #
MimeType MimeXmlCharsetutf8 Source # |
    application/xml; charset=utf-8
Methods mimeTypes :: Proxy * MimeXmlCharsetutf8 -> [MediaType] Source # mimeType :: Proxy * MimeXmlCharsetutf8 -> Maybe MediaType Source # mimeType' :: MimeXmlCharsetutf8 -> Maybe MediaType Source # mimeTypes' :: MimeXmlCharsetutf8 -> [MediaType] Source #
MimeType MimeJsonCharsetutf8 Source # |
    application/json; charset=utf-8
Methods mimeTypes :: Proxy * MimeJsonCharsetutf8 -> [MediaType] Source # mimeType :: Proxy * MimeJsonCharsetutf8 -> Maybe MediaType Source # mimeType' :: MimeJsonCharsetutf8 -> Maybe MediaType Source # mimeTypes' :: MimeJsonCharsetutf8 -> [MediaType] Source #

# MimeRender Class

class MimeType mtype => MimeRender mtype x where Source #

Minimal complete definition

mimeRender

Methods

mimeRender :: Proxy mtype -> x -> ByteString Source #

mimeRender' :: mtype -> x -> ByteString Source #

Instances

MimeRender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeRender :: Proxy * MimeNoContent -> NoContent -> ByteString Source # mimeRender' :: MimeNoContent -> NoContent -> ByteString Source #
MimeRender MimeOctetStream ByteString Source # |
    P.id
Methods mimeRender :: Proxy * MimeOctetStream -> ByteString -> ByteString Source # mimeRender' :: MimeOctetStream -> ByteString -> ByteString Source #
MimeRender MimeOctetStream String Source # |
    BCL.pack
Methods mimeRender :: Proxy * MimeOctetStream -> String -> ByteString Source # mimeRender' :: MimeOctetStream -> String -> ByteString Source #
MimeRender MimeOctetStream Text Source # |
    BL.fromStrict . T.encodeUtf8
Methods mimeRender :: Proxy * MimeOctetStream -> Text -> ByteString Source # mimeRender' :: MimeOctetStream -> Text -> ByteString Source #
MimeRender MimeMultipartFormData Bool Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Bool -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Bool -> ByteString Source #
MimeRender MimeMultipartFormData Char Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Char -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Char -> ByteString Source #
MimeRender MimeMultipartFormData Double Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Double -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Double -> ByteString Source #
MimeRender MimeMultipartFormData Float Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Float -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Float -> ByteString Source #
MimeRender MimeMultipartFormData Int Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Int -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Int -> ByteString Source #
MimeRender MimeMultipartFormData Integer Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Integer -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Integer -> ByteString Source #
MimeRender MimeMultipartFormData ByteString Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> ByteString -> ByteString Source # mimeRender' :: MimeMultipartFormData -> ByteString -> ByteString Source #
MimeRender MimeMultipartFormData String Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> String -> ByteString Source # mimeRender' :: MimeMultipartFormData -> String -> ByteString Source #
MimeRender MimeMultipartFormData Text Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Text -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Text -> ByteString Source #
MimeRender MimeMultipartFormData Binary Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Binary -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Binary -> ByteString Source #
MimeRender MimeMultipartFormData ByteArray Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> ByteArray -> ByteString Source # mimeRender' :: MimeMultipartFormData -> ByteArray -> ByteString Source #
MimeRender MimeMultipartFormData Date Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> Date -> ByteString Source # mimeRender' :: MimeMultipartFormData -> Date -> ByteString Source #
MimeRender MimeMultipartFormData DateTime Source # |
Methods mimeRender :: Proxy * MimeMultipartFormData -> DateTime -> ByteString Source # mimeRender' :: MimeMultipartFormData -> DateTime -> ByteString Source #
ToForm a => MimeRender MimeFormUrlEncoded a Source # |
    WH.urlEncodeAsForm
Methods mimeRender :: Proxy * MimeFormUrlEncoded -> a -> ByteString Source # mimeRender' :: MimeFormUrlEncoded -> a -> ByteString Source #
MimeRender MimePlainText ByteString Source # |
    P.id
Methods mimeRender :: Proxy * MimePlainText -> ByteString -> ByteString Source # mimeRender' :: MimePlainText -> ByteString -> ByteString Source #
MimeRender MimePlainText String Source # |
    BCL.pack
Methods mimeRender :: Proxy * MimePlainText -> String -> ByteString Source # mimeRender' :: MimePlainText -> String -> ByteString Source #
MimeRender MimePlainText Text Source # |
    BL.fromStrict . T.encodeUtf8
Methods mimeRender :: Proxy * MimePlainText -> Text -> ByteString Source # mimeRender' :: MimePlainText -> Text -> ByteString Source #
ToJSON a => MimeRender MimeJSON a Source # | `encode`
Methods mimeRender :: Proxy * MimeJSON -> a -> ByteString Source # mimeRender' :: MimeJSON -> a -> ByteString Source #
ToJSON a => MimeRender MimeJsonCharsetutf8 a Source # |
Methods mimeRender :: Proxy * MimeJsonCharsetutf8 -> a -> ByteString Source # mimeRender' :: MimeJsonCharsetutf8 -> a -> ByteString Source #

mimeRenderDefaultMultipartFormData :: ToHttpApiData a => a -> ByteString Source #

# MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Methods

mimeUnrender :: Proxy mtype -> ByteString -> Either String o Source #

mimeUnrender' :: mtype -> ByteString -> Either String o Source #

Instances

MimeUnrender MimeNoContent NoContent Source # |
    P.Right . P.const NoContent
Methods mimeUnrender :: Proxy * MimeNoContent -> ByteString -> Either String NoContent Source # mimeUnrender' :: MimeNoContent -> ByteString -> Either String NoContent Source #
MimeUnrender MimeOctetStream ByteString Source # |
    P.Right . P.id
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String ByteString Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String ByteString Source #
MimeUnrender MimeOctetStream String Source # |
    P.Right . BCL.unpack
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String String Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String String Source #
MimeUnrender MimeOctetStream Text Source # |
    P.left P.show . T.decodeUtf8' . BL.toStrict
Methods mimeUnrender :: Proxy * MimeOctetStream -> ByteString -> Either String Text Source # mimeUnrender' :: MimeOctetStream -> ByteString -> Either String Text Source #
FromForm a => MimeUnrender MimeFormUrlEncoded a Source # |
    P.left T.unpack . WH.urlDecodeAsForm
Methods mimeUnrender :: Proxy * MimeFormUrlEncoded -> ByteString -> Either String a Source # mimeUnrender' :: MimeFormUrlEncoded -> ByteString -> Either String a Source #
MimeUnrender MimePlainText ByteString Source # |
    P.Right . P.id
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String ByteString Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String ByteString Source #
MimeUnrender MimePlainText String Source # |
    P.Right . BCL.unpack
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String String Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String String Source #
MimeUnrender MimePlainText Text Source # |
    P.left P.show . TL.decodeUtf8'
Methods mimeUnrender :: Proxy * MimePlainText -> ByteString -> Either String Text Source # mimeUnrender' :: MimePlainText -> ByteString -> Either String Text Source #
FromJSON a => MimeUnrender MimeJSON a Source # |
    A.eitherDecode
Methods mimeUnrender :: Proxy * MimeJSON -> ByteString -> Either String a Source # mimeUnrender' :: MimeJSON -> ByteString -> Either String a Source #
FromJSON a => MimeUnrender MimeJsonCharsetutf8 a Source # |
Methods mimeUnrender :: Proxy * MimeJsonCharsetutf8 -> ByteString -> Either String a Source # mimeUnrender' :: MimeJsonCharsetutf8 -> ByteString -> Either String a Source #