Solution for What should I return in REST API?
is Given Below:
I know main patterns but what is best to return, for example,
POST returns – HttpStatus.CREATED but should I also return a newly created object also?
Should my PUT return a newly updated one and DELETE – deleted object?
I would also appreciate if you could tell me what are preferable status codes.