on master help sign in
Actually include the Patch.hs
commit71011745c0692f52994ad82df6f096cce23a4abe authorTimo von Holtz <tvh@anchor.com.au> dateTue 10 Feb 2015, 11:28 (12 years ago) parent59a20b2
1 file changed+19
src/Servant/API/Patch.hs+19
src/Servant/API/Patch.hsnew file+19
@@ -0,0 +1,19 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+module Servant.API.Patch where
3+
4+import Data.Typeable ( Typeable )
5+
6+-- | Endpoint for PATCH requests. The type variable represents the type of the
7+-- response body (not the request body, use 'Servant.API.ReqBody.ReqBody' for
8+-- that).
9+--
10+-- If the HTTP response is empty, only () is supported.
11+--
12+-- Example:
13+--
14+-- > -- POST /books
15+-- > -- with a JSON encoded Book as the request body
16+-- > -- returning the just-created Book
17+-- > type MyApi = "books" :> ReqBody Book :> Post Book
18+data Patch a
19+ deriving Typeable