204 Status Code There is no rule about it The current MDN text implies it can return it but can and should are different things Also that something is typically returned is not a rule about it s
Here s an excerpt from the description of the 204 status code by w3c The server has fulfilled the request but does not need to return an entity body and might want to return A client that receives a status code it doesn t recognize but it s starting with 2 should treat it as a 200 OK PUT If an existing resource is modified either the 200 OK or 204
204 Status Code
204 Status Code
[img-1]
[img_title-2]
[img-2]
[img_title-3]
[img-3]
For reference see how this status code is defined in the RFC 7231 6 3 5 204 No Content The 204 No Content status code indicates that the server has successfully fulfilled Background in Rails 5 a POST route without an associated View now simply returns a 204 status code to the browser instead of raising a ActionView MissingTemplate
If you want to be really specific with your response then you should check your conditions before sending the response and use the matching status code If the Controller Sadly neither of these options is a good clean solution Ideally your controller method would return a typed object rather than Object or ResponseEntity and there would be
More picture related to 204 Status Code
[img_title-4]
[img-4]
[img_title-5]
[img-5]
[img_title-6]
[img-6]
Initially for the practice of 204 No Content response producing it has been mentioned in official document at the position of introducing nestjs status code annotation I m having trouble to understand the use cases of the 204 HTTP status code The RFC2616 says 10 2 5 204 No Content The server has fulfilled the request but does not need to return an
[desc-10] [desc-11]
[img_title-7]
[img-7]
[img_title-8]
[img-8]
https://stackoverflow.com › questions
There is no rule about it The current MDN text implies it can return it but can and should are different things Also that something is typically returned is not a rule about it s
https://stackoverflow.com › questions
Here s an excerpt from the description of the 204 status code by w3c The server has fulfilled the request but does not need to return an entity body and might want to return
[img_title-9]
[img_title-7]
[img_title-10]
[img_title-11]
[img_title-12]
[img_title-13]
[img_title-13]
[img_title-14]
[img_title-15]
[img_title-16]
204 Status Code - [desc-13]