Instead of using a PUT against the resource URI for the “reopen” action, you could instead use a PUT against a URI like /api/tasks/0987/reopen. We tend to lean away from this approach, as it pushes you closer to specifying actions instead of resources (for the URI). However, we also think it’s a bit unrealistic to assume you can accommodate all available actions on something like a Task object with only four HTTP verbs. Indeed, there are a few more verbs you can use, including PATCH, HEAD, and OPTIONS. But even so, the set of available verbs is limited, and the REST architectural style dictates that you don’t add to those verbs. So at some point, you...
- Chapter 2: What Is RESTful?
- from ASP.NET Web API 2: Building a REST Service from Start to Finish
- Publisher: Apress
- Released: August 2014
Share this highlighthttp://www.safaribooksonline.com/a/aspnet-web-api/19792/