http response status for void methods #5665
Unanswered
andruskutt
asked this question in
Ideas
Replies: 1 comment
-
I agree from the narrow perspective that this makes sense but there are also cases where data is returned even though the method returns void. For example with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have in controller method with return type void. Current returned http status for it is 200 OK.
Maybe it's better to return 204 NO CONTENT for these methods by default?
I know I can use @Status(HttpStatus.NO_CONTENT) but this seems double work when we have declared method without return value.
Beta Was this translation helpful? Give feedback.
All reactions