Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Put a
Documentation
Endpoint for PUT requests, usually used to update a ressource.
The type a
is the type of the response body that's returned.
Example:
-- PUT /books/:isbn -- with a Book as request body, returning the updated Book type MyApi = "books" :> Capture "isbn" Text :> ReqBody Book :> Put Book
ToJSON a => HasServer (Put a) | When implementing the handler for a If successfully returning a value, we just require that its type has
a |
Typeable (* -> *) Put | |
type Server (Put a) = EitherT (Int, String) IO a |