From the implementation of ServiceStack having ResponseStatus for response DTOs, I haven't been returning any HTTP status codes on my own, well that is until I realized I wasn't really following the standard HTTP protocol by doing so. With that, what is it I should be doing? I basically have just a couple of situations:
1) 200: return the DTO as normal, no response status is filled
2) 404, 401 and 500: return an empty (nearly) DTO except it contains a ResponseStatus with my custom error code and error message.
I imagine I should be supplying some custom headers with my responses too, but I'm again not certain what the standard is, and I'm having a hard time finding a consensus online. Part of me thinks I shouldn't be returning a DTO when there's an error, but that would cause troubles for applications expecting JSON and just getting an error that it needs to check in the header. I mean, who is really going to use the HTTP status code or its associated header anyway?
Should be RESTful for the sake of being RESTful?