servant-0.14: 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) a :: * Source #
Methods
toLink :: (Link -> a) -> Proxy ((* :> ReqBody' mods ct a) sub) endpoint -> Link -> MkLink ((* :> ReqBody' mods ct a) sub) endpoint a Source #