on 70ffe01 help sign in
17 lines 519 B history raw
1{-# LANGUAGE DeriveDataTypeable #-}
2module Servant.API.Post where
4import Data.Typeable ( Typeable )
6-- | Endpoint for POST 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-- Example:
11--
12-- > -- POST /books
13-- > -- with a JSON encoded Book as the request body
14-- > -- returning the just-created Book
15-- > type MyApi = "books" :> ReqBody Book :> Post Book
16data Post a
17 deriving Typeable