Book Image

Building a RESTful Web Service with Spring

By : Ludovic Dewailly
Book Image

Building a RESTful Web Service with Spring

By: Ludovic Dewailly

Overview of this book

Table of Contents (17 chapters)
Building a RESTful Web Service with Spring
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 and DELETE methods