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

Safe HaskellNone
LanguageHaskell2010

Hreq.Core.API.Verb

Contents

Description

Module for working with HTTP methods and the resulting content at the type level.

Synopsis

Documentation

class ReflectMethod a where Source #

ReflectMethod class provides us with a way to obtain the Method data associated with a promoted HTTP Verb.

Instances
ReflectMethod PATCH Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod OPTIONS Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod CONNECT Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod TRACE Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod DELETE Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod PUT Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod HEAD Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod POST Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod GET Source # 
Instance details

Defined in Hreq.Core.API.Verb

type PUT = PUT Source #

type POST = POST Source #

type GET = GET Source #

data Verb (method :: k1) (contents :: [k2]) Source #

Verb is a type for representing the results of an HTTP client request call represented as content list and the HTTP method associated with it. Type synonyms for common verbs are provided but you free to define your own

>>> type Trace = Verb 'TRACE

Verb with contents example:

>>> type GetRaw = Verb 'GET '[ Raw ]
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 #

(UniqMembers rs "Response", HasResponse rs m) => HasResponse (Verb method rs :: Type) m Source # 
Instance details

Defined in Hreq.Core.Client.HasResponse

Associated Types

type HttpOutput (Verb method rs) :: Type Source #

Methods

httpRes :: sing (Verb method rs) -> Response -> m (HttpOutput (Verb method rs)) Source #

type HttpOutput (Verb method rs :: Type) Source # 
Instance details

Defined in Hreq.Core.Client.HasResponse

type HttpOutput (Verb method rs :: Type) = HttpOutput rs

Re-exports

data StdMethod #

HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH 
Instances
Bounded StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Enum StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Eq StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Ord StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Read StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Show StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Ix StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

ReflectMethod PATCH Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod OPTIONS Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod CONNECT Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod TRACE Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod DELETE Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod PUT Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod HEAD Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod POST Source # 
Instance details

Defined in Hreq.Core.API.Verb

ReflectMethod GET Source # 
Instance details

Defined in Hreq.Core.API.Verb

type Method = ByteString #

HTTP method (flat string type).