servant-client-core-0.18.2: Core functionality and class for client function generation for servant APIs
Safe HaskellNone
LanguageHaskell2010

Servant.Client.Core.Request

Contents

Synopsis

Documentation

data RequestF body path Source #

Instances

Instances details
Bifunctor RequestF Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

bimap :: (a -> b) -> (c -> d) -> RequestF a c -> RequestF b d #

first :: (a -> b) -> RequestF a c -> RequestF b c #

second :: (b -> c) -> RequestF a b -> RequestF a c #

Bitraversable RequestF Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> RequestF a b -> f (RequestF c d) #

Bifoldable RequestF Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

bifold :: Monoid m => RequestF m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> RequestF a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> RequestF a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> RequestF a b -> c #

Functor (RequestF body) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

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

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

Foldable (RequestF body) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

fold :: Monoid m => RequestF body m -> m #

foldMap :: Monoid m => (a -> m) -> RequestF body a -> m #

foldMap' :: Monoid m => (a -> m) -> RequestF body a -> m #

foldr :: (a -> b -> b) -> b -> RequestF body a -> b #

foldr' :: (a -> b -> b) -> b -> RequestF body a -> b #

foldl :: (b -> a -> b) -> b -> RequestF body a -> b #

foldl' :: (b -> a -> b) -> b -> RequestF body a -> b #

foldr1 :: (a -> a -> a) -> RequestF body a -> a #

foldl1 :: (a -> a -> a) -> RequestF body a -> a #

toList :: RequestF body a -> [a] #

null :: RequestF body a -> Bool #

length :: RequestF body a -> Int #

elem :: Eq a => a -> RequestF body a -> Bool #

maximum :: Ord a => RequestF body a -> a #

minimum :: Ord a => RequestF body a -> a #

sum :: Num a => RequestF body a -> a #

product :: Num a => RequestF body a -> a #

Traversable (RequestF body) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

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

sequenceA :: Applicative f => RequestF body (f a) -> f (RequestF body a) #

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

sequence :: Monad m => RequestF body (m a) -> m (RequestF body a) #

(Eq path, Eq body) => Eq (RequestF body path) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

(==) :: RequestF body path -> RequestF body path -> Bool #

(/=) :: RequestF body path -> RequestF body path -> Bool #

(Show a, Show b) => Show (RequestF a b) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

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

show :: RequestF a b -> String #

showList :: [RequestF a b] -> ShowS #

Generic (RequestF body path) Source # 
Instance details

Defined in Servant.Client.Core.Request

Associated Types

type Rep (RequestF body path) :: Type -> Type #

Methods

from :: RequestF body path -> Rep (RequestF body path) x #

to :: Rep (RequestF body path) x -> RequestF body path #

(NFData path, NFData body) => NFData (RequestF body path) Source # 
Instance details

Defined in Servant.Client.Core.Request

Methods

rnf :: RequestF body path -> () #

type Rep (RequestF body path) Source # 
Instance details

Defined in Servant.Client.Core.Request

type Rep (RequestF body path) = D1 ('MetaData "RequestF" "Servant.Client.Core.Request" "servant-client-core-0.18.2-J7kLWfOdgiZ4GJLSsc94Un" 'False) (C1 ('MetaCons "Request" 'PrefixI 'True) ((S1 ('MetaSel ('Just "requestPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 path) :*: (S1 ('MetaSel ('Just "requestQueryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq QueryItem)) :*: S1 ('MetaSel ('Just "requestBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (body, MediaType))))) :*: ((S1 ('MetaSel ('Just "requestAccept") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq MediaType)) :*: S1 ('MetaSel ('Just "requestHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Header))) :*: (S1 ('MetaSel ('Just "requestHttpVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HttpVersion) :*: S1 ('MetaSel ('Just "requestMethod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Method)))))

data RequestBody Source #

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

Instances

Instances details
Show RequestBody Source # 
Instance details

Defined in Servant.Client.Core.Request

Generic RequestBody Source # 
Instance details

Defined in Servant.Client.Core.Request

Associated Types

type Rep RequestBody :: Type -> Type #

type Rep RequestBody Source # 
Instance details

Defined in Servant.Client.Core.Request

type Rep RequestBody = D1 ('MetaData "RequestBody" "Servant.Client.Core.Request" "servant-client-core-0.18.2-J7kLWfOdgiZ4GJLSsc94Un" 'False) (C1 ('MetaCons "RequestBodyLBS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: (C1 ('MetaCons "RequestBodyBS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "RequestBodySource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourceIO ByteString)))))

Modifiers

appendToQueryString Source #

Arguments

:: Text

param name

-> Maybe Text

param value

-> Request 
-> Request 

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

Set body and media type of the request being constructed.

Since: 0.12

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