2xx Success
HTTP 204 No Content
The server successfully processed the request, but there is no content to send back.
When is 204 used?
- Successful DELETE requests
- Save without navigating away
- API calls that only need acknowledgment
How to handle a 204 response
No error handling is needed. Check that the response body and headers match what your client expects — for example, a 204 response has no body.
Check the status code a URL returns from the command line:
curl -s -o /dev/null -w "%{http_code}\n" https://example.comHow to return 204 from your server
Node.js (Express)
res.sendStatus(204);Python (Flask)
return "", 204Go (net/http)
w.WriteHeader(204)Frequently Asked Questions
What does HTTP 204 mean?
204 No Content: The server successfully processed the request, but there is no content to send back.
Is 204 an error?
No. 204 is in the 2xx Success class. Success: the request was received, understood, and accepted.