What 204 No Content means

204 No Content means the server completed the request successfully and deliberately returns no message body. Headers may still be present — for example, updated metadata or cache validators.

When a server should return it

  • A DELETE removed the resource and there is nothing to return.
  • A PUT or PATCH succeeded and the client does not need the new representation.
  • A POST triggered an action with no useful response payload.
  • A preflight or health check needs a response but no content.

Example response

http
HTTP/1.1 204 No Content
Cache-Control: no-store

Why you might see it unexpectedly

  • A client that assumes every success has JSON fails to parse an empty body — this is a client bug, not a server one.
  • A proxy stripping bodies can turn a 200 into an apparent 204; check Content-Length behavior.

Related status codes

200 OK is for responses with content. 205 Reset Content asks the client to reset the view. 304 Not Modified also has no body but is specific to conditional caching.