11 RESTful Web Services with Spring

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Creating your first REST web service
  • Returning Different HTTP Status Codes from REST Web Service
  • Learning an annotation-based configuration alternative
  • Using REST web services with XML
  • Using the exception handling mechanism
  • Unit testing RESTful services

REST stands for REpresentational State Transfer. It is an architectural principle based on top of HTTP to represent resources by doing operations on them. You can definitely say that it's neither a specification nor a standard. It's a way of representing data and manipulating a resource that resides on the server. REST web services solely depend on the HTTP methods. For each method, respective operations on a resource take place. The GET method is used to retrieve a resource or a collection of resources. The POST method is used to create. The PUT method is used to update, and the DELETE method is used to remove the resource from the system.

Providing REST web services within a web application is one of the most popular approaches for offering your application programming interface (API) to third-party applications. Popular sites such as Facebook, Twitter, and LinkedIn offer REST web services for accessing stored ...

Get Beginning Spring now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.