hreq-core-0.1.1.0: Core functionality for Hreq Http client library

Safe HaskellNone
LanguageHaskell2010

Hreq.Core.API.Request

Contents

Description

Specification for valid Request component types used at the Kind and Type level for creating an API structure.

Synopsis

Request Type

data ReqContent a Source #

Constructors

Path a Symbol 
Params [(Symbol, a)] 
QueryFlags a [Symbol] 
Captures [a] 
BasicAuth a Symbol 
CaptureAll a 
ReqBody a a 
StreamBody a a 
ReqHeaders [(Symbol, a)] 
Instances
(HttpReqConstraints ts, ReflectMethod method, SingI (Req ts), SingI (Res rs), HttpResConstraints rs) => HasRequest (ts :: [ReqContent Type]) (Verb method rs) Source # 
Instance details

Defined in Hreq.Core.Client.HasRequest

Associated Types

type HttpInput ts :: Type Source #

Methods

httpReq :: Proxy (Verb method rs) -> Proxy ts -> HttpInput ts -> Request -> Request Source #

SingI ts => SingI (Params ts :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (Params ts) Source #

SingI ts => SingI (Captures ts :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (Captures ts) Source #

SingI a => SingI (CaptureAll a :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (CaptureAll a) Source #

SingI a => SingI (ReqHeaders a :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (ReqHeaders a) Source #

(SingI a, SingI s) => SingI (Path a s :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (Path a s) Source #

(SingI a, SingI ts) => SingI (QueryFlags a ts :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (QueryFlags a ts) Source #

(SingI a, SingI s) => SingI (BasicAuth a s :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (BasicAuth a s) Source #

(SingI a, SingI ctyp) => SingI (ReqBody ctyp a :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (ReqBody ctyp a) Source #

(SingI a, SingI ctyp) => SingI (StreamBody ctyp a :: ReqContent Type) Source # 
Instance details

Defined in Hreq.Core.API.Request

Methods

sing :: Sing (StreamBody ctyp a) Source #

type Sing Source # 
Instance details

Defined in Hreq.Core.API.Request

type HttpInput (ts :: [ReqContent Type]) Source # 
Instance details

Defined in Hreq.Core.Client.HasRequest

type HttpInput (ts :: [ReqContent Type]) = Hlist (HttpReq ts)

Request Type Synonyms

type Path = Path () Source #

type QueryFlag (s :: Symbol) = QueryFlags '[s] Source #

type Param s t = Params '['(s, t)] Source #

type Capture t = Captures '[t] Source #

Request as a Singleton GADT

data SReqContent (a :: ReqContent Type) Source #

Constructors

a ~ Path t s => SPath (Sing t) (Sing s) 
a ~ QueryFlags b ts => SQueryFlags (Sing b) (Sing ts) 
a ~ CaptureAll b => SCaptureAll (Sing b) 
a ~ Captures ts => SCaptures (Sing ts) 
a ~ ReqBody ctyp b => SReqBody (Sing ctyp) (Sing b) 
a ~ StreamBody ctyp b => SStreamBody (Sing ctyp) (Sing b) 
a ~ ReqHeaders ts => SReqHeaders (Sing ts) 
a ~ Params ts => SParams (Sing ts) 
a ~ BasicAuth b s => SBasicAuth (Sing b) (Sing s)