servant-0.13.0.1: A family of combinators for defining webservices APIs
Servant.API.ReqBody
Synopsis
type ReqBody = ReqBody' '[Required, Strict] Source #
Extract the request body as a value of type a.
a
Example:
>>> -- POST /books >>> type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book
>>>
-- POST /books
type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book
data ReqBody' (mods :: [*]) (contentTypes :: [*]) (a :: *) Source #
Note: ReqBody' is always Required.
ReqBody'
Required
Instances
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 #