In order to respect the best practices of the REST principles, is it best to return the created/updated entity upon a POST/PUT ? Or return an empty HTTP body with the Location header?
More precisely, when a resource is created by a POST, should we return:
- Status 201 + Location header + (the created entity in the HTTP body)
OR
- Status 201 + Location header + (empty body)
When a resource is updated by a PUT, should we return:
- Status 200 + (the updated entity in the HTTP body)
OR
- Status 204 (empty body)