What it means
The request succeeded and there's no body to send. The headers can still carry useful metadata, such as a new ETag.
A 204 response must not include a body.
Why you're seeing it
- A successful
DELETE. - A
PUTorPATCHwhere the client already has the new state. - Analytics beacons and CORS preflight responses.
How to fix it
- Don't send a body or
Content-Lengthgreater than zero; some clients hang or misread the next response. - If the client needs the updated resource, return
200with it instead.
Example response
HTTP/1.1 204 No Content ETag: "v7"