HTTP 204 No Content indicates the server successfully processed the request but is not returning any content in the response body. This is commonly used for DELETE operations, preflight CORS requests, and save operations where no response body is needed.
204 No ContentPOST /notifications/dismiss HTTP/1.1
Host: www.example.com
User-Agent: curl/8.6.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 16
notification_id=9HTTP/1.1 204 No ContentA 204 confirms success. If you expected data in the response, the server or API may need to return 200 instead.
For preflight responses, verify Access-Control-Allow-Origin and Access-Control-Allow-Methods headers are present.
curl -v -X OPTIONS -H 'Origin: https://example.com' https://api.example.com/data
Even without a body, the response may contain useful headers like ETag, Last-Modified, or Location.
The resource was deleted or updated successfully and no response body is needed.
The server responded to an OPTIONS preflight request indicating the actual request is allowed.
| Specification | Section |
|---|---|
| HTTP Semantics | RFC 9110 §15.3.5 |
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.