But in all seriousness…. So long as you and your team have a documented understanding of how your services operate, there is a bit of freedom to build things how you want them to operate. As with other technologies there are going to be people who deem themselves to be purists and want things done a certain way. Then there are the pragmatists that will look for the optimum balance between using a technology correctly (assuming that can be defined) and getting the job done.
Another example of HTTP debates is whether you return a 404 when an entity doesn’t exist. The problem with a 404 is that particularly a lot of monitoring services treat this as if the worlds going to end, instead of it being a valid response indicating that the entity doesn’t exist. A lot of systems return a wrapper around responses to indicate if the call was a success or not. That way when you look at your dashboard for your service, you’ll see green lights unless there is actually an issue. Of course from a REST standpoint this isn’t really correct, since doing a GET on an entity that doesn’t exist should return a 404, and it’s only a 400 that is actually a bad request. Nick Randolph | Built to Roam Pty Ltd | Microsoft MVP – Windows Platform Development | +61 412 413 425 | @thenickrandolph | skype:nick_randolph The information contained in this email is confidential. If you are not the intended recipient, you may not disclose or use the information in this email in any way. Built to Roam Pty Ltd does not guarantee the integrity of any emails or attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Built to Roam Pty Ltd. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of DotNet Dude Sent: Monday, 27 March 2017 10:49 AM To: ozDotNet <ozdotnet@ozdotnet.com> Subject: Re: WebApi - PUT and DELETE Just ask a bunch of devs to define REST and you get all different answers. I wouldn't take all this too seriously though :) On Monday, 27 March 2017, Greg Keogh <gfke...@gmail.com<mailto:gfke...@gmail.com>> wrote: Yep the client should detect what has changed As an aside: this discussion hints at just what a shambles REST is. As Wikipedia reminds us, REST is just a "style" not a well defined "protocol" like SOAP for example. I just don't know how this subject leaked out of a guy's PhD thesis and was adopted worldwide. There are no rock solid conventions for verb usage, for what comes in and out of the body, or for error handling. A web search on REST and verbs produces reams of arguments, confusion and conflict. It's a modern technical tragedy that we got to this situation -- GK