January 21, 2015


According to http://rest.elkstein.org/ : REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a stateless, client-server, cacheable communications protocol -- and in virtually all cases, the HTTP protocol is used. REST is an architecture style for designing networked applications.

ASP.NET Web API is a framework for building HTTP based services and is ideal for creating RESTful services over HTTP. The best place to start looking for information/tutorials etc. is http://www.asp.net/web-api

Here is how the operations map to HTTP methods:
Operation HTTP Method Relative URI
Get all members GET /api/members
Create a new member POST /api/members
Get member GET /api/members/{username}
Update member PUT /api/members/{username}
Delete member DELETE /api/members/{username}
In general terms then, one could say that the mapping between REST and CRUD is (loosely)
HTTP POST maps to Create
HTTP GET maps to Read
HTTP PUT maps to Update
HTTP DELETE maps to Delete

No comments: