git.iko.soy/typeable/servant
on 98e02ea help sign in
17 lines 528 B history raw
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE KindSignatures #-}
4module Servant.API.Put where
6import Data.Typeable ( Typeable )
8-- | Endpoint for PUT requests, usually used to update a ressource.
9-- The type @a@ is the type of the response body that's returned.
10--
11-- Example:
12--
13-- > -- PUT /books/:isbn
14-- > -- with a Book as request body, returning the updated Book
15-- > type MyApi = "books" :> Capture "isbn" Text :> ReqBody Book :> Put '[JSON] Book
16data Put (cts::[*]) a
17 deriving Typeable