git.iko.soy/typeable/servant
on 98e02ea help sign in
19 lines 597 B history raw
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE KindSignatures #-}
4module Servant.API.Post where
6import Data.Typeable ( Typeable )
8-- | Endpoint for POST 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-- 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 '[JSON] Book
18data Post (cts::[*]) a
19 deriving Typeable