2016-01-16 19:17:46 +01:00
|
|
|
{-# LANGUAGE DataKinds #-}
|
|
|
|
{-# LANGUAGE TypeOperators #-}
|
|
|
|
|
|
|
|
module Servant.API.Internal.Test.ComprehensiveAPI where
|
|
|
|
|
|
|
|
import Data.Proxy
|
|
|
|
|
|
|
|
import Servant.API
|
|
|
|
|
|
|
|
type GET = Get '[JSON] ()
|
|
|
|
|
|
|
|
type ComprehensiveAPI =
|
|
|
|
GET :<|>
|
|
|
|
Get '[JSON] Int :<|>
|
|
|
|
Capture "foo" Int :> GET :<|>
|
|
|
|
Header "foo" Int :> GET :<|>
|
2016-01-16 19:34:44 +01:00
|
|
|
HttpVersion :> GET :<|>
|
2016-01-16 19:17:46 +01:00
|
|
|
IsSecure :> GET :<|>
|
|
|
|
QueryParam "foo" Int :> GET :<|>
|
|
|
|
QueryParams "foo" Int :> GET :<|>
|
|
|
|
QueryFlag "foo" :> GET :<|>
|
|
|
|
-- Raw :<|>
|
|
|
|
-- RemoteHost :<|>
|
|
|
|
ReqBody '[JSON] Int :> GET :<|>
|
|
|
|
-- Get '[JSON] (Headers '[Header "foo" Int] ()) :<|>
|
|
|
|
"foo" :> GET :<|>
|
|
|
|
Vault :> GET :<|>
|
|
|
|
Verb 'POST 204 '[JSON] () :<|>
|
|
|
|
Verb 'POST 204 '[JSON] Int
|
|
|
|
|
|
|
|
comprehensiveAPI :: Proxy ComprehensiveAPI
|
|
|
|
comprehensiveAPI = Proxy
|