The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body. Metadata in the response header fields refer to the target resource and its selected representation after the requested action was applied.
The 204 response allows a server to indicate that the action has been successfully applied to the target resource, while implying that the user agent does not need to traverse away from its current “document view” (if any). The server assumes that the user agent will provide some indication of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to its active representation.
A 204 response is terminated by the first empty line after the header fields because it cannot contain a message body.
The 204
is bascially a 200 but without any body. It’s appropriate if
you don’t have a resource that’s worth responding with.
A 204
response is cacheable by default.