HTTP 204 No Content — What It Means & How to Fix It
Informational2xx success
Overview
The HTTP 204 No Content status code indicates the server successfully processed the request but is not returning any content in the response body.
Key Details
- This status code is commonly used for DELETE requests where no response body is needed.
- It can also be used for PUT/PATCH updates that do not need to return the updated resource.
- The response must not include a body.
- Headers in the response may contain updated metadata.
Common Causes
- A DELETE request successfully removed a resource.
- A PUT or PATCH request updated a resource without needing to return data.
- A form submission that requires no response content.
Steps
- 1Do not attempt to parse a response body from a 204 response.
- 2Check response headers for any updated metadata like ETag.
- 3If you need the updated resource after a PATCH, consider using 200 with a body instead.
- 4Update client-side state based on the successful operation.
Tags
httpsuccessno-contentdeleterest-api
Related Items
More in 2xx Success
http-200-okHTTP 200 OK — What It Means & How to Fix It
Informationalhttp-201-createdHTTP 201 Created — What It Means & How to Fix It
Informationalhttp-202-acceptedHTTP 202 Accepted — What It Means & How to Fix It
Informationalhttp-203-non-authoritative-informationHTTP 203 Non-Authoritative Information — What It Means & How to Fix It
Informationalhttp-205-reset-contentHTTP 205 Reset Content — What It Means & How to Fix It
Informationalhttp-206-partial-contentHTTP 206 Partial Content — What It Means & How to Fix It
InformationalFrequently Asked Questions
Use 204 for successful operations where the client does not need a response body, such as DELETE operations or updates where the client already has the data.