Response Entity Shortcuts
Kleuth provides helper functions to reduce ResponseEntity boilerplate.
Examples#
Http Status 200#
Before:
After:
Http Status 204#
Before:
After:
Function References#
The functions can either be called with a body, or with a function reference:
is equivalent to:
Headers#
Headers can also be passed in:
Full List#
| Http Status | Function Name |
|---|---|
| 200 | ok |
| 201 | created |
| 202 | accepted |
| 204 | no content |
| 206 | partial content |
| 300 | multiple choices |
| 301 | moved permanently |
| 302 | found |
| 303 | see other |