on 0453cc3 help sign in
21 lines 670 B history raw
1{-# LANGUAGE DeriveDataTypeable #-}
2{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE KindSignatures #-}
4module Servant.API.Patch where
6import Data.Typeable ( Typeable )
8-- | Endpoint for PATCH requests. The type variable represents the type of the
9-- response body (not the request body, use 'Servant.API.ReqBody.ReqBody' for
10-- that).
11--
12-- If the HTTP response is empty, only () is supported.
13--
14-- Example:
15--
16-- > -- PATCH /books
17-- > -- with a JSON encoded Book as the request body
18-- > -- returning the just-created Book
19-- > type MyApi = "books" :> ReqBody Book :> Patch '[JSON] Book
20data Patch (contentTypes::[*]) a
21 deriving Typeable