servant-client-core-0.20.3.0: Core functionality and class for client function generation for servant APIs

Safe Haskell | None
Language | Haskell2010

Servant.Client.Core.MultiVerb.ResponseUnrender

# Documentation

data SomeClientResponse Source #

Constructors

Typeable a => SomeClientResponse (ResponseF a) |

fromSomeClientResponse :: forall a m. (Alternative m, Typeable a) => SomeClientResponse -> m (ResponseF a) Source #

class ResponseUnrender (cs :: k) a where Source #

Associated Types

type ResponseBody a Source #

type ResponseStatus a :: Nat Source #

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody a) -> UnrenderResult (ResponseType a) Source #

#### Instances

Instances details

(AsHeaders xs (ResponseType r) a, ServantHeaders hs xs, ResponseUnrender cs r) => ResponseUnrender (cs :: k) (WithHeaders hs a r) Source # |

Instance details

Defined in Servant.Client.Core.MultiVerb.ResponseUnrender

Associated Types

type ResponseBody (WithHeaders hs a r) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseBody (WithHeaders hs a r) = ResponseBody r
type ResponseStatus (WithHeaders hs a r) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseStatus (WithHeaders hs a r) = ResponseStatus r

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody (WithHeaders hs a r)) -> UnrenderResult (ResponseType (WithHeaders hs a r)) Source #

KnownStatus s => ResponseUnrender (cs :: k) (RespondStreaming s desc framing ct) Source # |

Instance details

Defined in Servant.Client.Core.MultiVerb.ResponseUnrender

Associated Types

type ResponseBody (RespondStreaming s desc framing ct) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseBody (RespondStreaming s desc framing ct) = SourceIO ByteString
type ResponseStatus (RespondStreaming s desc framing ct) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseStatus (RespondStreaming s desc framing ct) = s

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody (RespondStreaming s desc framing ct)) -> UnrenderResult (ResponseType (RespondStreaming s desc framing ct)) Source #

KnownStatus s => ResponseUnrender (cs :: k) (RespondAs '() s desc ()) Source # |

Instance details

Defined in Servant.Client.Core.MultiVerb.ResponseUnrender

Associated Types

type ResponseBody (RespondAs '() s desc ()) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseBody (RespondAs '() s desc ()) = ()
type ResponseStatus (RespondAs '() s desc ()) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseStatus (RespondAs '() s desc ()) = s

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody (RespondAs '() s desc ())) -> UnrenderResult (ResponseType (RespondAs '() s desc ())) Source #

(KnownStatus s, MimeUnrender ct a) => ResponseUnrender (cs :: k) (RespondAs ct s desc a) Source # |

Instance details

Defined in Servant.Client.Core.MultiVerb.ResponseUnrender

Associated Types

type ResponseBody (RespondAs ct s desc a) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseBody (RespondAs ct s desc a) = ByteString
type ResponseStatus (RespondAs ct s desc a) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseStatus (RespondAs ct s desc a) = s

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody (RespondAs ct s desc a)) -> UnrenderResult (ResponseType (RespondAs ct s desc a)) Source #

(AllMimeUnrender cs a, KnownStatus s) => ResponseUnrender (cs :: [Type]) (Respond s desc a) Source # |

Instance details

Defined in Servant.Client.Core.MultiVerb.ResponseUnrender

Associated Types

type ResponseBody (Respond s desc a) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseBody (Respond s desc a) = ByteString
type ResponseStatus (Respond s desc a) |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender type ResponseStatus (Respond s desc a) = s

Methods

responseUnrender :: MediaType -> ResponseF (ResponseBody (Respond s desc a)) -> UnrenderResult (ResponseType (Respond s desc a)) Source #

class Typeable as => ResponseListUnrender (cs :: k) (as :: [Type]) where Source #

Methods

responseListUnrender :: MediaType -> SomeClientResponse -> UnrenderResult (Union (ResponseTypes as)) Source #

responseListStatuses :: [Status] Source #

#### Instances

Instances details

ResponseListUnrender (cs :: k) ('[] :: [Type]) Source # |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender Methods responseListUnrender :: MediaType -> SomeClientResponse -> UnrenderResult (Union (ResponseTypes ('[] :: [Type]))) Source # responseListStatuses :: [Status] Source #
(Typeable a, Typeable (ResponseBody a), ResponseUnrender cs a, ResponseListUnrender cs as, KnownStatus (ResponseStatus a)) => ResponseListUnrender (cs :: k) (a ': as) Source # |
Instance details Defined in Servant.Client.Core.MultiVerb.ResponseUnrender Methods responseListUnrender :: MediaType -> SomeClientResponse -> UnrenderResult (Union (ResponseTypes (a ': as))) Source # responseListStatuses :: [Status] Source #