Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ContentType a = MimeType a => ContentType {
- unContentType :: a
- data Accept a = MimeType a => Accept {
- unAccept :: a
- 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
ContentType MimeType
data ContentType a Source #
MimeType a => ContentType | |
|
Accept MimeType
Consumes Class
class MimeType mtype => Consumes req mtype Source #
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 TestInlineAdditionalProperties 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 #
Default Mime Types
data MimePlainText Source #
MimeType MimePlainText Source # | text/plain; charset=utf-8 |
MimeUnrender MimePlainText ByteString Source # | P.Right . P.id |
MimeUnrender MimePlainText String Source # | P.Right . BCL.unpack |
MimeUnrender MimePlainText Text Source # | P.left P.show . TL.decodeUtf8' |
MimeRender MimePlainText ByteString Source # | P.id |
MimeRender MimePlainText String Source # | BCL.pack |
MimeRender MimePlainText Text Source # | BL.fromStrict . T.encodeUtf8 |
data MimeFormUrlEncoded Source #
MimeType MimeFormUrlEncoded Source # | application/x-www-form-urlencoded |
FromForm a => MimeUnrender MimeFormUrlEncoded a Source # | P.left T.unpack . WH.urlDecodeAsForm |
ToForm a => MimeRender MimeFormUrlEncoded a Source # | WH.urlEncodeAsForm |
Consumes UpdatePetWithForm MimeFormUrlEncoded Source # | application/x-www-form-urlencoded |
data MimeMultipartFormData Source #
data MimeOctetStream Source #
MimeType MimeOctetStream Source # | application/octet-stream |
MimeUnrender MimeOctetStream ByteString Source # | P.Right . P.id |
MimeUnrender MimeOctetStream String Source # | P.Right . BCL.unpack |
MimeUnrender MimeOctetStream Text Source # | P.left P.show . T.decodeUtf8' . BL.toStrict |
MimeRender MimeOctetStream ByteString Source # | P.id |
MimeRender MimeOctetStream String Source # | BCL.pack |
MimeRender MimeOctetStream Text Source # | BL.fromStrict . T.encodeUtf8 |
data MimeNoContent Source #
MimeType MimeNoContent Source # | |
MimeUnrender MimeNoContent NoContent Source # | P.Right . P.const NoContent |
MimeRender MimeNoContent NoContent Source # | P.Right . P.const NoContent |
A type for responses without content-body.
Eq NoContent Source # | |
Show NoContent Source # | |
MimeUnrender MimeNoContent NoContent Source # | P.Right . P.const NoContent |
MimeRender MimeNoContent NoContent Source # | P.Right . P.const NoContent |
MimeType Class
class Typeable mtype => MimeType mtype where Source #
mimeTypes :: Proxy mtype -> [MediaType] Source #
mimeType :: Proxy mtype -> Maybe MediaType Source #
mimeType' :: mtype -> Maybe MediaType Source #
mimeTypes' :: mtype -> [MediaType] Source #
MimeType MimeAny Source # | "*/*" |
MimeType MimeNoContent Source # | |
MimeType MimeOctetStream Source # | application/octet-stream |
MimeType MimeMultipartFormData Source # | multipart/form-data |
MimeType MimeFormUrlEncoded Source # | application/x-www-form-urlencoded |
MimeType MimePlainText Source # | text/plain; charset=utf-8 |
MimeType MimeXML Source # | application/xml; charset=utf-8 |
MimeType MimeJSON Source # | application/json; charset=utf-8 |
MimeType MimeXmlCharsetutf8 Source # | application/xml; charset=utf-8 |
MimeType MimeJsonCharsetutf8 Source # | application/json; charset=utf-8 |
MimeRender Class
class MimeType mtype => MimeRender mtype x where Source #
mimeRender :: Proxy mtype -> x -> ByteString Source #
mimeRender' :: mtype -> x -> ByteString Source #
mimeRenderDefaultMultipartFormData :: ToHttpApiData a => a -> ByteString Source #
MimeUnrender Class
class MimeType mtype => MimeUnrender mtype o where Source #
mimeUnrender :: Proxy mtype -> ByteString -> Either String o Source #
mimeUnrender' :: mtype -> ByteString -> Either String o Source #
MimeUnrender MimeNoContent NoContent Source # | P.Right . P.const NoContent |
MimeUnrender MimeOctetStream ByteString Source # | P.Right . P.id |
MimeUnrender MimeOctetStream String Source # | P.Right . BCL.unpack |
MimeUnrender MimeOctetStream Text Source # | P.left P.show . T.decodeUtf8' . BL.toStrict |
FromForm a => MimeUnrender MimeFormUrlEncoded a Source # | P.left T.unpack . WH.urlDecodeAsForm |
MimeUnrender MimePlainText ByteString Source # | P.Right . P.id |
MimeUnrender MimePlainText String Source # | P.Right . BCL.unpack |
MimeUnrender MimePlainText Text Source # | P.left P.show . TL.decodeUtf8' |
FromJSON a => MimeUnrender MimeJSON a Source # | A.eitherDecode |
FromJSON a => MimeUnrender MimeJsonCharsetutf8 a Source # | |