Some endpoints, such as POST /api/v1/assignments, respond to a successful request with a 200 status code and an empty response body. Other endpoints, such as POST /api/v1/set-password, respond with a 204 status code and an empty response body. A 204 response communicates more clearly than a 200 response that no further action is expected of the client. A 200 response is more appropriate if the operation was successful and the server is returning data to the client in order for the client to do something further with that data.
If the response for a successful operation has no data for the client to do something further with, the response should consistently have status code 204 instead of 200.
Some endpoints, such as POST /api/v1/assignments, respond to a successful request with a 200 status code and an empty response body. Other endpoints, such as POST /api/v1/set-password, respond with a 204 status code and an empty response body. A 204 response communicates more clearly than a 200 response that no further action is expected of the client. A 200 response is more appropriate if the operation was successful and the server is returning data to the client in order for the client to do something further with that data.
If the response for a successful operation has no data for the client to do something further with, the response should consistently have status code 204 instead of 200.