servant-0.11: A family of combinators for defining webservices APIs

Safe HaskellSafe
LanguageHaskell2010

Servant.API.Verbs

Contents

Synopsis

Documentation

data Verb method statusCode 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

Instances

HasLink * (Verb k k1 m s ct a) Source # 

Associated Types

type MkLink (Verb k k1 m s ct a) (endpoint :: Verb k k1 m s ct a) :: * Source #

Methods

toLink :: Proxy (Verb k k1 m s ct a) endpoint -> Link -> MkLink (Verb k k1 m s ct a) endpoint Source #

Generic (Verb k k1 method statusCode contentTypes a) Source # 

Associated Types

type Rep (Verb k k1 method statusCode contentTypes a) :: * -> * #

Methods

from :: Verb k k1 method statusCode contentTypes a -> Rep (Verb k k1 method statusCode contentTypes a) x #

to :: Rep (Verb k k1 method statusCode contentTypes a) x -> Verb k k1 method statusCode contentTypes a #

type MkLink * (Verb k k1 m s ct a) Source # 
type MkLink * (Verb k k1 m s ct a) = Link
type Rep (Verb k k1 method statusCode contentTypes a) Source # 
type Rep (Verb k k1 method statusCode contentTypes a) = D1 (MetaData "Verb" "Servant.API.Verbs" "servant-0.11-4V2Kat1ZPa65cYjlpXcD7T" False) V1

200 responses

type Get = Verb GET 200 Source #

GET with 200 status code.

type Post = Verb POST 200 Source #

POST with 200 status code.

type Put = Verb PUT 200 Source #

PUT with 200 status code.

type Delete = Verb DELETE 200 Source #

DELETE with 200 status code.

type Patch = Verb PATCH 200 Source #

PATCH with 200 status code.

Other responses

201 Created

type PostCreated = Verb POST 201 Source #

POST with 201 status code.

202 Accepted

type GetAccepted = Verb GET 202 Source #

GET with 202 status code.

type PostAccepted = Verb POST 202 Source #

POST with 202 status code.

type DeleteAccepted = Verb DELETE 202 Source #

DELETE with 202 status code.

type PatchAccepted = Verb PATCH 202 Source #

PATCH with 202 status code.

type PutAccepted = Verb PUT 202 Source #

PUT with 202 status code.

203 Non-Authoritative Information

type GetNonAuthoritative = Verb GET 203 Source #

GET with 203 status code.

type PostNonAuthoritative = Verb POST 203 Source #

POST with 203 status code.

type DeleteNonAuthoritative = Verb DELETE 203 Source #

DELETE with 203 status code.

type PatchNonAuthoritative = Verb PATCH 203 Source #

PATCH with 203 status code.

type PutNonAuthoritative = Verb PUT 203 Source #

PUT with 203 status code.

204 No Content

type GetNoContent = Verb GET 204 Source #

GET with 204 status code.

type PostNoContent = Verb POST 204 Source #

POST with 204 status code.

type DeleteNoContent = Verb DELETE 204 Source #

DELETE with 204 status code.

type PatchNoContent = Verb PATCH 204 Source #

PATCH with 204 status code.

type PutNoContent = Verb PUT 204 Source #

PUT with 204 status code.

205 Reset Content

type GetResetContent = Verb GET 205 Source #

GET with 205 status code.

type PostResetContent = Verb POST 205 Source #

POST with 205 status code.

type DeleteResetContent = Verb DELETE 205 Source #

DELETE with 205 status code.

type PatchResetContent = Verb PATCH 205 Source #

PATCH with 205 status code.

type PutResetContent = Verb PUT 205 Source #

PUT with 205 status code.

206 Partial Content

type GetPartialContent = Verb GET 206 Source #

GET with 206 status code.

data StdMethod :: * #

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH 

Instances

Bounded StdMethod 
Enum StdMethod 
Eq StdMethod 
Ord StdMethod 
Read StdMethod 
Show StdMethod 
Ix StdMethod 
ReflectMethod StdMethod TRACE Source # 

Methods

reflectMethod :: Proxy TRACE a -> Method Source #

ReflectMethod StdMethod PUT Source # 

Methods

reflectMethod :: Proxy PUT a -> Method Source #

ReflectMethod StdMethod POST Source # 

Methods

reflectMethod :: Proxy POST a -> Method Source #

ReflectMethod StdMethod PATCH Source # 

Methods

reflectMethod :: Proxy PATCH a -> Method Source #

ReflectMethod StdMethod OPTIONS Source # 

Methods

reflectMethod :: Proxy OPTIONS a -> Method Source #

ReflectMethod StdMethod HEAD Source # 

Methods

reflectMethod :: Proxy HEAD a -> Method Source #

ReflectMethod StdMethod GET Source # 

Methods

reflectMethod :: Proxy GET a -> Method Source #

ReflectMethod StdMethod DELETE Source # 

Methods

reflectMethod :: Proxy DELETE a -> Method Source #

ReflectMethod StdMethod CONNECT Source # 

Methods

reflectMethod :: Proxy CONNECT a -> Method Source #