Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [*]) a
- type Get = Verb GET 200
- type Post = Verb POST 200
- type Put = Verb PUT 200
- type Delete = Verb DELETE 200
- type Patch = Verb PATCH 200
- type PostCreated = Verb POST 201
- type GetAccepted = Verb GET 202
- type PostAccepted = Verb POST 202
- type DeleteAccepted = Verb DELETE 202
- type PatchAccepted = Verb PATCH 202
- type PutAccepted = Verb PUT 202
- type GetNonAuthoritative = Verb GET 203
- type PostNonAuthoritative = Verb POST 203
- type DeleteNonAuthoritative = Verb DELETE 203
- type PatchNonAuthoritative = Verb PATCH 203
- type PutNonAuthoritative = Verb PUT 203
- type GetNoContent = Verb GET 204
- type PostNoContent = Verb POST 204
- type DeleteNoContent = Verb DELETE 204
- type PatchNoContent = Verb PATCH 204
- type PutNoContent = Verb PUT 204
- type GetResetContent = Verb GET 205
- type PostResetContent = Verb POST 205
- type DeleteResetContent = Verb DELETE 205
- type PatchResetContent = Verb PATCH 205
- type PutResetContent = Verb PUT 205
- type GetPartialContent = Verb GET 206
- class ReflectMethod a where
- data StdMethod :: *
Documentation
data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [*]) a Source #
Verb
is a general type for representing HTTP verbs (a.k.a. methods). For
convenience, type synonyms for each verb with a 200 response code are
provided, but you are free to define your own:
>>>
type Post204 contentTypes a = Verb 'POST 204 contentTypes a
200 responses
Other responses
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
class ReflectMethod a where Source #
reflectMethod :: Proxy a -> Method Source #
HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).