@@ -88,19 +88,30 @@ type UserAPI3 = "users" :> "list-all" :> "now" :> Get '[JSON] [User]
88### `Delete`, `Get`, `Patch`, `Post` and `Put`
88### `Delete`, `Get`, `Patch`, `Post` and `Put`
91−These 5 combinators are very similar except that they each describe a
91+The `Get` combinator is defined in terms of the more general `Verb`:
92−different HTTP method. This is how they're declared
92+``` haskell ignore
93+data Verb method (statusCode :: Nat) (contentType :: [*]) a
94+type Get = Verb 'GET 200
97+There are other predefined type synonyms for other common HTTP methods,
100+data Delete = Verb 'DELETE 200
101+data Patch = Verb 'PATCH 200
102+data Post = Verb 'POST 200
103+data Put = Verb 'PUT 200
106+There are also variants that do not return a 200 status code, such
94``` haskell ignore
108``` haskell ignore
95−data Delete (contentTypes :: [*]) a
109+type PostCreated = Verb 'POST 201
96−data Get (contentTypes :: [*]) a
110+type PostAccepted = Verb 'POST 202
97−data Patch (contentTypes :: [*]) a
98−data Post (contentTypes :: [*]) a
99−data Put (contentTypes :: [*]) a
102−An endpoint ends with one of the 5 combinators above (unless you write your
113+An endpoint always ends with a variant of the `Verb` combinator
103−own). Examples:
114+(unless you write your own combinators). Examples:
105``` haskell
116``` haskell
106type UserAPI4 = "users" :> Get '[JSON] [User]
117type UserAPI4 = "users" :> Get '[JSON] [User]