Chapter 5. CRUD Operations in REST
In Chapter 3, The First Endpoint, we created our first RESTful endpoint to access rooms in our sample property management system. Requests to retrieve data are typically mapped to the HTTP GET
method in RESTful web services.
Now, we will expand on this previous example and implement the remaining endpoints to support all CRUD (Create, Read, Update, and Delete) operations.
In this chapter, we will cover the following topics:
- Mapping CRUD operations to HTTP methods
- Creating resources
- Updating resources
- Deleting resources
- Testing RESTful operations
- Emulating
PUT
andDELETE
methods