RESTful web services - best way to return result of an operation?
Posted
by saille
on Stack Overflow
See other posts from Stack Overflow
or by saille
Published on 2010-04-20T01:43:45Z
Indexed on
2010/04/20
1:53 UTC
Read the original article
Hit count: 319
rest
I am designing a RESTful API and I would like to know what the most RESTful way is to return details about an operation.
E.g. an operation on a resource occurs when some data is POSTed to a URL. HTTP status codes will indicate either success or failure for the operation. But apart from success/failure I need to indicate some other info to the client, such as an ID number.
So my question is, should the ID number be returned in an XML document in the response content, or should it be returned in some custom HTTP header fields? Which is more in line with the principles of REST? Or am I free to choose.
© Stack Overflow or respective owner