Whenever we build a web application that encapsulates logic that could be helpful to other related applications, we will often also write and consume web services. This is because they expose functionality over a network, which is accessible through the HTTP protocol, making an application a single source of truth.
In this chapter, we will write a RESTful API that supports GET, POST, PUT, and DELETE HTTP methods, and then we will learn how we can version the REST API, which is very helpful when we are creating APIs consumed publicly. We will finish up with writing the REST client to consume them.