Add / expand the documentation of the NoContent case.
This commit is contained in:
parent
0a2235261c
commit
43f3cea901
1 changed files with 6 additions and 1 deletions
|
@ -149,10 +149,15 @@ type UserAPI5 = "user" :> Capture "userid" Integer :> Get '[JSON] User
|
||||||
-- except that we explicitly say that "userid"
|
-- except that we explicitly say that "userid"
|
||||||
-- must be an integer
|
-- must be an integer
|
||||||
|
|
||||||
:<|> "user" :> Capture "userid" Integer :> Delete '[] ()
|
:<|> "user" :> Capture "userid" Integer :> DeleteNoContent '[JSON] NoContent
|
||||||
-- equivalent to 'DELETE /user/:userid'
|
-- 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`, `QueryFlag`
|
||||||
|
|
||||||
`QueryParam`, `QueryParams` and `QueryFlag` are about query string
|
`QueryParam`, `QueryParams` and `QueryFlag` are about query string
|
||||||
|
|
Loading…
Reference in a new issue