Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module for working with HTTP methods and the resulting content at the type level.
Synopsis
- class ReflectMethod a where
- reflectMethod :: Proxy a -> Method
- type Patch = Verb PATCH
- type PATCH = PATCH
- type Delete = Verb DELETE
- type DELETE = DELETE
- type Put = Verb PUT
- type PUT = PUT
- type Post = Verb POST
- type POST = POST
- type Get = Verb GET
- type GET = GET
- data Verb (method :: k1) (contents :: [k2])
- data StdMethod
- type Method = ByteString
Documentation
class ReflectMethod a where Source #
ReflectMethod
class provides us with a way to obtain the Method
data
associated with a promoted HTTP Verb.
reflectMethod :: Proxy a -> Method Source #
Instances
ReflectMethod PATCH Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod OPTIONS Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod CONNECT Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod TRACE Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod DELETE Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod PUT Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod HEAD Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod POST Source # | |
Defined in Hreq.Core.API.Verb | |
ReflectMethod GET Source # | |
Defined in Hreq.Core.API.Verb |
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 # | |
(UniqMembers rs "Response", HasResponse rs m) => HasResponse (Verb method rs :: Type) m Source # | |
Defined in Hreq.Core.Client.HasResponse type HttpOutput (Verb method rs) :: Type Source # | |
type HttpOutput (Verb method rs :: Type) Source # | |
Defined in Hreq.Core.Client.HasResponse |
Re-exports
HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).
Instances
type Method = ByteString #
HTTP method (flat string type).