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

Safe HaskellNone
LanguageHaskell2010

Servant.Client.Core.Internal.Request

Synopsis

Documentation

data ServantError Source #

A type representing possible errors in a request

Note that this type substantially changed in 0.12.

Constructors

FailureResponse Response

The server returned an error response

DecodeFailure Text Response

The body could not be decoded at the expected type

UnsupportedContentType MediaType Response

The content-type of the response is not supported

InvalidContentTypeHeader Response

The content-type header is invalid

ConnectionError Text

There was a connection error, and no response was received

Instances
Eq ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Show ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Generic ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Associated Types

type Rep ServantError :: Type -> Type #

Exception ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

NFData ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Methods

rnf :: ServantError -> () #

type Rep ServantError Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

data RequestF a Source #

Instances
Generic (RequestF a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Associated Types

type Rep (RequestF a) :: Type -> Type #

Methods

from :: RequestF a -> Rep (RequestF a) x #

to :: Rep (RequestF a) x -> RequestF a #

type Rep (RequestF a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

data RequestBody Source #

The request body. A replica of the http-client RequestBody.

Instances
Generic RequestBody Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Associated Types

type Rep RequestBody :: Type -> Type #

type Rep RequestBody Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

data GenResponse a Source #

Instances
Functor GenResponse Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Methods

fmap :: (a -> b) -> GenResponse a -> GenResponse b #

(<$) :: a -> GenResponse b -> GenResponse a #

Foldable GenResponse Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Methods

fold :: Monoid m => GenResponse m -> m #

foldMap :: Monoid m => (a -> m) -> GenResponse a -> m #

foldr :: (a -> b -> b) -> b -> GenResponse a -> b #

foldr' :: (a -> b -> b) -> b -> GenResponse a -> b #

foldl :: (b -> a -> b) -> b -> GenResponse a -> b #

foldl' :: (b -> a -> b) -> b -> GenResponse a -> b #

foldr1 :: (a -> a -> a) -> GenResponse a -> a #

foldl1 :: (a -> a -> a) -> GenResponse a -> a #

toList :: GenResponse a -> [a] #

null :: GenResponse a -> Bool #

length :: GenResponse a -> Int #

elem :: Eq a => a -> GenResponse a -> Bool #

maximum :: Ord a => GenResponse a -> a #

minimum :: Ord a => GenResponse a -> a #

sum :: Num a => GenResponse a -> a #

product :: Num a => GenResponse a -> a #

Traversable GenResponse Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Methods

traverse :: Applicative f => (a -> f b) -> GenResponse a -> f (GenResponse b) #

sequenceA :: Applicative f => GenResponse (f a) -> f (GenResponse a) #

mapM :: Monad m => (a -> m b) -> GenResponse a -> m (GenResponse b) #

sequence :: Monad m => GenResponse (m a) -> m (GenResponse a) #

Eq a => Eq (GenResponse a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Show a => Show (GenResponse a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Generic (GenResponse a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Associated Types

type Rep (GenResponse a) :: Type -> Type #

Methods

from :: GenResponse a -> Rep (GenResponse a) x #

to :: Rep (GenResponse a) x -> GenResponse a #

NFData a => NFData (GenResponse a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

Methods

rnf :: GenResponse a -> () #

type Rep (GenResponse a) Source # 
Instance details

Defined in Servant.Client.Core.Internal.Request

type Rep (GenResponse a) = D1 (MetaData "GenResponse" "Servant.Client.Core.Internal.Request" "servant-client-core-0.15-BELfpAH4M6qDJZvAfR1UCC" False) (C1 (MetaCons "Response" PrefixI True) ((S1 (MetaSel (Just "responseStatusCode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Status) :*: S1 (MetaSel (Just "responseHeaders") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Seq Header))) :*: (S1 (MetaSel (Just "responseHttpVersion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 HttpVersion) :*: S1 (MetaSel (Just "responseBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))

appendToQueryString Source #

Arguments

:: Text

param name

-> Maybe Text

param value

-> Request 
-> Request 

setRequestBodyLBS :: ByteString -> MediaType -> Request -> Request Source #

Set body and media type of the request being constructed.

The body is set to the given bytestring using the RequestBodyLBS constructor.

Since: 0.12

setRequestBody :: RequestBody -> MediaType -> Request -> Request Source #

Set body and media type of the request being constructed.

Since: 0.12