Response Entity Shortcuts
Kleuth provides helper functions to reduce ResponseEntity
boilerplate.
#
Examples#
Http Status 200Before:
After:
#
Http Status 204Before:
After:
#
Function ReferencesThe functions can either be called with a body, or with a function reference:
is equivalent to:
#
HeadersHeaders can also be passed in:
#
Full ListHttp 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 |