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

Safe Haskell | Safe
Language | Haskell2010

Servant.API.Verbs

Synopsis

- class ReflectMethod a where
  - reflectMethod :: Proxy a -> Method
- type GetPartialContent = Verb GET 206
- type PutResetContent = Verb PUT 205
- type PatchResetContent = Verb PATCH 205
- type DeleteResetContent = Verb DELETE 205
- type PostResetContent = Verb POST 205
- type GetResetContent = Verb GET 205
- type PutNoContent = Verb PUT 204
- type PatchNoContent = Verb PATCH 204
- type DeleteNoContent = Verb DELETE 204
- type PostNoContent = Verb POST 204
- type GetNoContent = Verb GET 204
- type PutNonAuthoritative = Verb PUT 203
- type PatchNonAuthoritative = Verb PATCH 203
- type DeleteNonAuthoritative = Verb DELETE 203
- type PostNonAuthoritative = Verb POST 203
- type GetNonAuthoritative = Verb GET 203
- type PutAccepted = Verb PUT 202
- type PatchAccepted = Verb PATCH 202
- type DeleteAccepted = Verb DELETE 202
- type PostAccepted = Verb POST 202
- type GetAccepted = Verb GET 202
- type PutCreated = Verb PUT 201
- type PostCreated = Verb POST 201
- type Patch = Verb PATCH 200
- type Delete = Verb DELETE 200
- type Put = Verb PUT 200
- type Post = Verb POST 200
- type Get = Verb GET 200
- data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [*]) (a :: *)
- data StdMethod
  - = GET
  - | POST
  - | HEAD
  - | PUT
  - | DELETE
  - | TRACE
  - | CONNECT
  - | OPTIONS
  - | PATCH

# Documentation

class ReflectMethod a where Source #

Methods

reflectMethod :: Proxy a -> Method Source #

Instances

ReflectMethod PATCH Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy PATCH -> Method Source #
ReflectMethod OPTIONS Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy OPTIONS -> Method Source #
ReflectMethod CONNECT Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy CONNECT -> Method Source #
ReflectMethod TRACE Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy TRACE -> Method Source #
ReflectMethod DELETE Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy DELETE -> Method Source #
ReflectMethod PUT Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy PUT -> Method Source #
ReflectMethod HEAD Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy HEAD -> Method Source #
ReflectMethod POST Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy POST -> Method Source #
ReflectMethod GET Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy GET -> Method Source #

type GetPartialContent = Verb GET 206 Source #

`GET` with 206 status code.

type PutResetContent = Verb PUT 205 Source #

`PUT` with 205 status code.

type PatchResetContent = Verb PATCH 205 Source #

`PATCH` with 205 status code.

type DeleteResetContent = Verb DELETE 205 Source #

`DELETE` with 205 status code.

type PostResetContent = Verb POST 205 Source #

`POST` with 205 status code.

type GetResetContent = Verb GET 205 Source #

`GET` with 205 status code.

type PutNoContent = Verb PUT 204 Source #

`PUT` with 204 status code.

type PatchNoContent = Verb PATCH 204 Source #

`PATCH` with 204 status code.

type DeleteNoContent = Verb DELETE 204 Source #

`DELETE` with 204 status code.

type PostNoContent = Verb POST 204 Source #

`POST` with 204 status code.

type GetNoContent = Verb GET 204 Source #

`GET` with 204 status code.

type PutNonAuthoritative = Verb PUT 203 Source #

`PUT` with 203 status code.

type PatchNonAuthoritative = Verb PATCH 203 Source #

`PATCH` with 203 status code.

type DeleteNonAuthoritative = Verb DELETE 203 Source #

`DELETE` with 203 status code.

type PostNonAuthoritative = Verb POST 203 Source #

`POST` with 203 status code.

type GetNonAuthoritative = Verb GET 203 Source #

`GET` with 203 status code.

type PutAccepted = Verb PUT 202 Source #

`PUT` with 202 status code.

type PatchAccepted = Verb PATCH 202 Source #

`PATCH` with 202 status code.

type DeleteAccepted = Verb DELETE 202 Source #

`DELETE` with 202 status code.

type PostAccepted = Verb POST 202 Source #

`POST` with 202 status code.

type GetAccepted = Verb GET 202 Source #

`GET` with 202 status code.

type PutCreated = Verb PUT 201 Source #

`PUT` with 201 status code.

type PostCreated = Verb POST 201 Source #

`POST` with 201 status code.

type Patch = Verb PATCH 200 Source #

`PATCH` with 200 status code.

type Delete = Verb DELETE 200 Source #

`DELETE` with 200 status code.

type Put = Verb PUT 200 Source #

`PUT` with 200 status code.

type Post = Verb POST 200 Source #

`POST` with 200 status code.

type Get = Verb GET 200 Source #

`GET` with 200 status code.

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

Instances

HasLink (Verb m s ct a :: Type) Source # |
Instance details Defined in Servant.Links Associated Types type MkLink (Verb m s ct a) a :: Type Source # Methods toLink :: (Link -> a0) -> Proxy (Verb m s ct a) -> Link -> MkLink (Verb m s ct a) a0 Source #
Generic (Verb method statusCode contentTypes a) Source # |
Instance details Defined in Servant.API.Verbs Associated Types type Rep (Verb method statusCode contentTypes a) :: Type -> Type Source # Methods from :: Verb method statusCode contentTypes a -> Rep (Verb method statusCode contentTypes a) x Source # to :: Rep (Verb method statusCode contentTypes a) x -> Verb method statusCode contentTypes a Source #
type MkLink (Verb m s ct a :: Type) r Source # |
Instance details Defined in Servant.Links type MkLink (Verb m s ct a :: Type) r = r
type Rep (Verb method statusCode contentTypes a) Source # |
Instance details Defined in Servant.API.Verbs type Rep (Verb method statusCode contentTypes a) = D1 (MetaData "Verb" "Servant.API.Verbs" "servant-0.15-Fivin89YsQNK2itBc5FoLx" False) (V1 :: Type -> Type)

data StdMethod Source #

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 Methods minBound :: StdMethod Source # maxBound :: StdMethod Source #
Enum StdMethod |

Instance details

Defined in Network.HTTP.Types.Method

Methods

succ :: StdMethod -> StdMethod Source #

pred :: StdMethod -> StdMethod Source #

toEnum :: Int -> StdMethod Source #

fromEnum :: StdMethod -> Int Source #

enumFrom :: StdMethod -> [StdMethod] Source #

enumFromThen :: StdMethod -> StdMethod -> [StdMethod] Source #

enumFromTo :: StdMethod -> StdMethod -> [StdMethod] Source #

enumFromThenTo :: StdMethod -> StdMethod -> StdMethod -> [StdMethod] Source #

Eq StdMethod |
Instance details Defined in Network.HTTP.Types.Method Methods (==) :: StdMethod -> StdMethod -> Bool Source # (/=) :: StdMethod -> StdMethod -> Bool Source #
Ord StdMethod |

Instance details

Defined in Network.HTTP.Types.Method

Methods

compare :: StdMethod -> StdMethod -> Ordering Source #

(<) :: StdMethod -> StdMethod -> Bool Source #

(<=) :: StdMethod -> StdMethod -> Bool Source #

(>) :: StdMethod -> StdMethod -> Bool Source #

(>=) :: StdMethod -> StdMethod -> Bool Source #

max :: StdMethod -> StdMethod -> StdMethod Source #

min :: StdMethod -> StdMethod -> StdMethod Source #

Read StdMethod |
Instance details Defined in Network.HTTP.Types.Method Methods readsPrec :: Int -> ReadS StdMethod Source # readList :: ReadS [StdMethod] Source # readPrec :: ReadPrec StdMethod Source # readListPrec :: ReadPrec [StdMethod] Source #
Show StdMethod |
Instance details Defined in Network.HTTP.Types.Method Methods showsPrec :: Int -> StdMethod -> ShowS Source # show :: StdMethod -> String Source # showList :: [StdMethod] -> ShowS Source #
Ix StdMethod |

Instance details

Defined in Network.HTTP.Types.Method

Methods

range :: (StdMethod, StdMethod) -> [StdMethod] Source #

index :: (StdMethod, StdMethod) -> StdMethod -> Int Source #

unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int

inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool Source #

rangeSize :: (StdMethod, StdMethod) -> Int Source #

unsafeRangeSize :: (StdMethod, StdMethod) -> Int

ReflectMethod PATCH Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy PATCH -> Method Source #
ReflectMethod OPTIONS Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy OPTIONS -> Method Source #
ReflectMethod CONNECT Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy CONNECT -> Method Source #
ReflectMethod TRACE Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy TRACE -> Method Source #
ReflectMethod DELETE Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy DELETE -> Method Source #
ReflectMethod PUT Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy PUT -> Method Source #
ReflectMethod HEAD Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy HEAD -> Method Source #
ReflectMethod POST Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy POST -> Method Source #
ReflectMethod GET Source # |
Instance details Defined in Servant.API.Verbs Methods reflectMethod :: Proxy GET -> Method Source #