servant-client-namedargs-0.1.0.0: Automatically derive API client functions with named and optional parameters

Safe HaskellNone
LanguageHaskell2010

Servant.Client.NamedArgs

Contents

Description

Provides instances to be able to use combinators from Servant.API.NamedArgs with Servant.Client, returning functions using named parameters from Named

Orphan instances

(KnownSymbol name, ToHttpApiData a, HasClient m api) => HasClient m (NamedParams name a :> api) Source #

NamedParamss become optional named arguments taking a list and defaulting to an empty list

Instance details

Associated Types

type Client m (NamedParams name a :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedParams name a :> api) -> Request -> Client m (NamedParams name a :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedParams name a :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedParams name a :> api) -> Client mon' (NamedParams name a :> api) #

(KnownSymbol name, ToHttpApiData a, HasClient m api, SBoolI (FoldRequired mods)) => HasClient m (NamedParam mods name a :> api) Source #

NamedParams become either required or optional named arguments depending on if Required or Optional are in the modifiers

Instance details

Associated Types

type Client m (NamedParam mods name a :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedParam mods name a :> api) -> Request -> Client m (NamedParam mods name a :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedParam mods name a :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedParam mods name a :> api) -> Client mon' (NamedParam mods name a :> api) #

(KnownSymbol name, ToHttpApiData a, HasClient m api, SBoolI (FoldRequired mods)) => HasClient m (NamedHeader' mods name a :> api) Source #

NamedHeader's become either required or optional named arguments depending on if Required or Optional are in the modifiers

Instance details

Associated Types

type Client m (NamedHeader' mods name a :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedHeader' mods name a :> api) -> Request -> Client m (NamedHeader' mods name a :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedHeader' mods name a :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedHeader' mods name a :> api) -> Client mon' (NamedHeader' mods name a :> api) #

(KnownSymbol name, HasClient m api) => HasClient m (NamedFlag name :> api) Source #

NamedFlags become optional named arguments, defaulting to False

Instance details

Associated Types

type Client m (NamedFlag name :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedFlag name :> api) -> Request -> Client m (NamedFlag name :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedFlag name :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedFlag name :> api) -> Client mon' (NamedFlag name :> api) #

(KnownSymbol name, ToHttpApiData a, HasClient m api) => HasClient m (NamedCaptureAll name a :> api) Source #

NamedCaptureAlls become optional named arguments taking a list and defaulting to an empty list

Instance details

Associated Types

type Client m (NamedCaptureAll name a :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedCaptureAll name a :> api) -> Request -> Client m (NamedCaptureAll name a :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedCaptureAll name a :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedCaptureAll name a :> api) -> Client mon' (NamedCaptureAll name a :> api) #

(KnownSymbol name, ToHttpApiData a, HasClient m api) => HasClient m (NamedCapture' mods name a :> api) Source #

NamedCapture's become required named arguments

Instance details

Associated Types

type Client m (NamedCapture' mods name a :> api) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (NamedCapture' mods name a :> api) -> Request -> Client m (NamedCapture' mods name a :> api) #

hoistClientMonad :: Proxy m -> Proxy (NamedCapture' mods name a :> api) -> (forall x. mon x -> mon' x) -> Client mon (NamedCapture' mods name a :> api) -> Client mon' (NamedCapture' mods name a :> api) #