DELAPARRA
Index
Color
NL
Category: HTTP status codes

204 No Content

Explained by Updated

What is 204 No Content?

204 No Content: The request succeeded, but there is no response body to return. 204 No Content means the request succeeded and there is nothing to send back. It is common after a DELETE, or after an update where the client already knows the result. The response must not contain a body. Clients that try to parse JSON from a 204 will fail, so front-end code should check the status before reading the response. Some libraries handle this for you and some do not.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about 204 No Content

What should you keep in mind with 204 No Content?

It is a small but useful signal. It tells the client the action worked without wasting bandwidth on an empty object. If the client does need the updated data, for example to refresh a list, return 200 with the new resource instead. Pick one convention per API and keep to it, so front-end developers do not have to guess.

At a glance

CategoryHTTP status codes
Explained by
Updated

More HTTP status codes terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.