Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Post a
Documentation
Endpoint for POST requests. The type variable represents the type of the
response body (not the request body, use RQBody
for
that).
Example:
-- POST /books -- with a JSON encoded Book as the request body -- returning the just-created Book type MyApi = "books" :> ReqBody Book :> Post Book
VLinkHelper * (Post x) | |
ToJSON a => HasServer (Post a) | When implementing the handler for a If successfully returning a value, we just require that its type has
a |
Typeable (* -> *) Post | |
type Server (Post a) = EitherT (Int, String) IO a |