What status code should I set for UPDATE (PUT) and DELETE (e.g. product successfully updated)? Thx
For a PUT requset: HTTP 200 or HTTP 204 should imply "resource updated successfully".
For a DELETE request: HTTP 200 or HTTP 204 should imply "resource deleted successfully". HTTP 202 can also be returned which would imply that the instruction was accepted by the server and the "resource was marked for deletion".
9.6 PUT
If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes > SHOULD be sent to indicate successful completion of the request.
9.7 DELETE
A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity.
Source: w3.org: HTTP/1.1 Method Definitions
HTTP 200 OK: Standard response for successful HTTP requests. The actual response will depend on the request method used.
HTTP 204 No Content: The server successfully processed the request, but is not returning any content
200 for both. 200 = OK
Sorry read slightly wrong. What he said!
RFC 2616 describes which status codes to use.
And no, it's not always 200.
Short answer: for both PUT and DELETE, you should send either 200 (OK) or 204 (No Content).
Long answer: here's a complete decision diagram.