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

Safe HaskellNone
LanguageHaskell2010

Servant.API.ReqBody

Synopsis

Documentation

type ReqBody = ReqBody' '[Required, Strict] Source #

Extract the request body as a value of type a.

Example:

>>> -- POST /books
>>> type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book

data ReqBody' (mods :: [*]) (contentTypes :: [*]) (a :: *) Source #

Note: ReqBody' is always Required.

Instances

HasLink * sub => HasLink * ((:>) * (ReqBody' mods ct a) sub) Source # 

Associated Types

type MkLink ((* :> ReqBody' mods ct a) sub) (endpoint :: (* :> ReqBody' mods ct a) sub) :: * Source #

Methods

toLink :: Proxy ((* :> ReqBody' mods ct a) sub) endpoint -> Link -> MkLink ((* :> ReqBody' mods ct a) sub) endpoint Source #

type MkLink * ((:>) * (ReqBody' mods ct a) sub) Source # 
type MkLink * ((:>) * (ReqBody' mods ct a) sub) = MkLink * sub