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

Safe HaskellSafe
LanguageHaskell2010

Servant.API.Post

Synopsis

Documentation

data Post contentTypes a Source

Endpoint for POST requests. The type variable represents the type of the response body (not the request body, use ReqBody for that).

Example:

>>> -- POST /books
>>> -- with a JSON encoded Book as the request body
>>> -- returning the just-created Book
>>> type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book

Instances

HasLink * (Post y r) Source 
type MkLink * (Post y r) = URI Source