Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Servant.API.Verbs
Synopsis
- type Delete = Verb 'DELETE 200
- type DeleteAccepted = Verb 'DELETE 202
- type DeleteNoContent = NoContentVerb 'DELETE
- type DeleteNonAuthoritative = Verb 'DELETE 203
- type Get = Verb 'GET 200
- type GetAccepted = Verb 'GET 202
- type GetNoContent = NoContentVerb 'GET
- type GetNonAuthoritative = Verb 'GET 203
- type GetPartialContent = Verb 'GET 206
- type GetResetContent = Verb 'GET 205
- data NoContentVerb (method :: k1)
- type Patch = Verb 'PATCH 200
- type PatchAccepted = Verb 'PATCH 202
- type PatchNoContent = NoContentVerb 'PATCH
- type PatchNonAuthoritative = Verb 'PATCH 203
- type Post = Verb 'POST 200
- type PostAccepted = Verb 'POST 202
- type PostCreated = Verb 'POST 201
- type PostNoContent = NoContentVerb 'POST
- type PostNonAuthoritative = Verb 'POST 203
- type PostResetContent = Verb 'POST 205
- type Put = Verb 'PUT 200
- type PutAccepted = Verb 'PUT 202
- type PutCreated = Verb 'PUT 201
- type PutNoContent = NoContentVerb 'PUT
- type PutNonAuthoritative = Verb 'PUT 203
- class ReflectMethod (a :: k) where
- reflectMethod :: Proxy a -> Method
- data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a
- type HeadNoContent = NoContentVerb 'HEAD
- type DeleteResetContent = Verb 'DELETE 205
- type PatchResetContent = Verb 'PATCH 205
- type PutResetContent = Verb 'PUT 205
- data StdMethod
Documentation
type DeleteNoContent = NoContentVerb 'DELETE Source #
DELETE
with 204 status code.
type GetNoContent = NoContentVerb 'GET Source #
GET
with 204 status code.
data NoContentVerb (method :: k1) Source #
NoContentVerb
is a specific type to represent NoContent
responses.
It does not require either a list of content types (because there's
no content) or a status code (because it should always be 204).
Instances
HasLink (NoContentVerb m :: Type) Source # | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a Source # | |||||
Generic (NoContentVerb method) Source # | |||||
Defined in Servant.API.Verbs Associated Types
Methods from :: NoContentVerb method -> Rep (NoContentVerb method) x to :: Rep (NoContentVerb method) x -> NoContentVerb method | |||||
type MkLink (NoContentVerb m :: Type) r Source # | |||||
Defined in Servant.Links | |||||
type Rep (NoContentVerb method) Source # | |||||
Defined in Servant.API.Verbs type Rep (NoContentVerb method) = D1 ('MetaData "NoContentVerb" "Servant.API.Verbs" "servant-0.20.1-2HpCcqMgt3gNUzJ9jndj" 'False) (V1 :: Type -> Type) |
type PatchNoContent = NoContentVerb 'PATCH Source #
PATCH
with 204 status code.
type PostNoContent = NoContentVerb 'POST Source #
POST
with 204 status code.
type PutNoContent = NoContentVerb 'PUT Source #
PUT
with 204 status code.
class ReflectMethod (a :: k) where Source #
Methods
reflectMethod :: Proxy a -> Method Source #
Instances
data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) 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 # | |||||
Generic (Verb method statusCode contentTypes a) Source # | |||||
Defined in Servant.API.Verbs Associated Types
| |||||
AtLeastOneFragment (Verb m s ct typ) Source # | If fragment appeared in API endpoint twice, compile-time error would be raised.
| ||||
Defined in Servant.API.TypeLevel | |||||
type MkLink (Verb m s ct a :: Type) r Source # | |||||
Defined in Servant.Links | |||||
type Rep (Verb method statusCode contentTypes a) Source # | |||||
Defined in Servant.API.Verbs |
type HeadNoContent = NoContentVerb 'HEAD Source #
HEAD
with 204 status code.
Instances
Data StdMethod | |||||
Defined in Network.HTTP.Types.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StdMethod -> c StdMethod gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StdMethod toConstr :: StdMethod -> Constr dataTypeOf :: StdMethod -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StdMethod) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StdMethod) gmapT :: (forall b. Data b => b -> b) -> StdMethod -> StdMethod gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r gmapQ :: (forall d. Data d => d -> u) -> StdMethod -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> StdMethod -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod | |||||
Bounded StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Enum StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Generic StdMethod | |||||
Defined in Network.HTTP.Types.Method Associated Types
| |||||
Ix StdMethod | |||||
Defined in Network.HTTP.Types.Method Methods range :: (StdMethod, StdMethod) -> [StdMethod] index :: (StdMethod, StdMethod) -> StdMethod -> Int unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool rangeSize :: (StdMethod, StdMethod) -> Int unsafeRangeSize :: (StdMethod, StdMethod) -> Int | |||||
Read StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Show StdMethod | |||||
Eq StdMethod | |||||
Ord StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
ReflectMethod 'CONNECT Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'CONNECT -> Method Source # | |||||
ReflectMethod 'DELETE Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'DELETE -> Method Source # | |||||
ReflectMethod 'GET Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'GET -> Method Source # | |||||
ReflectMethod 'HEAD Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'HEAD -> Method Source # | |||||
ReflectMethod 'OPTIONS Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'OPTIONS -> Method Source # | |||||
ReflectMethod 'PATCH Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PATCH -> Method Source # | |||||
ReflectMethod 'POST Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'POST -> Method Source # | |||||
ReflectMethod 'PUT Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PUT -> Method Source # | |||||
ReflectMethod 'TRACE Source # | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'TRACE -> Method Source # | |||||
type Rep StdMethod | |||||
Defined in Network.HTTP.Types.Method type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-CjmG8TUif6e6bpzpwD9FBQ" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type))))) |