servant-client-core-0.13.0.1: 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 # 
Show ServantError Source # 
Generic ServantError Source # 

Associated Types

type Rep ServantError :: * -> * #

Exception ServantError Source # 
type Rep ServantError Source # 

data RequestF a Source #

Instances

Functor RequestF Source # 

Methods

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

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

Eq a => Eq (RequestF a) Source # 

Methods

(==) :: RequestF a -> RequestF a -> Bool #

(/=) :: RequestF a -> RequestF a -> Bool #

Show a => Show (RequestF a) Source # 

Methods

showsPrec :: Int -> RequestF a -> ShowS #

show :: RequestF a -> String #

showList :: [RequestF a] -> ShowS #

Generic (RequestF a) Source # 

Associated Types

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

Methods

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

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

type Rep (RequestF a) Source # 

data GenResponse a Source #

Instances

Functor GenResponse Source # 

Methods

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

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

Foldable GenResponse Source # 

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 # 

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 # 
Show a => Show (GenResponse a) Source # 
Generic (GenResponse a) Source # 

Associated Types

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

Methods

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

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

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

newtype StreamingResponse Source #

Constructors

StreamingResponse 

Fields

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