I am developing a RESTful API, and I would like to know what is the most RESTful way to return operation data.
eg. a resource operation occurs when some data is sent to a URL. HTTP status codes indicate success or failure of the operation. But besides success / failure, I need to provide some other information to the client, such as an identification number.
So my question is, should the ID number be returned in the XML document in the response content, or should it be returned in some custom HTTP header fields? Which is more in line with REST principles? Or am I free to choose.
source share