1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE TypeOperators #-}
9-- | API spec for server, client, and docs
10type API = "getunit" :> Get '[JSON] ()
11 :<|> "getint" :> Get '[JSON] Int
12 :<|> "sayhi" :> QueryParam "username" Text
13 :> QueryParams "greetings" Text
16 :<|> "double" :> ReqBody '[JSON] Double
17 :> Post '[JSON] Double
18 :<|> "a" :> "b" :> QueryFlag "gusto" :> Get '[JSON] Text
21type GET = Get '[JSON] ()
23-- Imported the comprehensive API example for testing.
24-- https://github.com/haskell-servant/servant/blob/master/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs
25type ComprehensiveAPI =
28 Capture "foo" Int :> GET :<|>
29 Header "foo" Int :> GET :<|>
30 HttpVersion :> GET :<|>
32 QueryParam "foo" Int :> GET :<|>
33 QueryParams "foo" Int :> GET :<|>
34 QueryFlag "foo" :> GET :<|>
36 RemoteHost :> GET :<|>
37 ReqBody '[JSON] Int :> GET :<|>
38 Get '[JSON] (Headers '[Header "foo" Int] ()) :<|>
41 Verb 'POST 204 '[JSON] () :<|>
42 Verb 'POST 204 '[JSON] Int
43-- This one isn't in scope
44-- :<|> WithNamedContext "foo" '[] GET
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list