Add / expand the documentation of the NoContent case.

This commit is contained in:
Andres Loeh 2016-01-28 13:30:58 +01:00
parent 0a2235261c
commit 43f3cea901

View file

@ -149,10 +149,15 @@ type UserAPI5 = "user" :> Capture "userid" Integer :> Get '[JSON] User
-- except that we explicitly say that "userid"
-- must be an integer
:<|> "user" :> Capture "userid" Integer :> Delete '[] ()
:<|> "user" :> Capture "userid" Integer :> DeleteNoContent '[JSON] NoContent
-- equivalent to 'DELETE /user/:userid'
```
In the second case, `DeleteNoContent` specifies a 204 response code,
`JSON` specifies the content types on which the handler will match,
and `NoContent` is a Haskell type isomorphic to `()` used to represent
a trivial piece of information.
### `QueryParam`, `QueryParams`, `QueryFlag`
`QueryParam`, `QueryParams` and `QueryFlag` are about query string