In order to test various APIs without relying on external sources, we will create our own local API. You do not need to know any backend language, nor how to expose an API. In this chapter, we will use a special library that builds an API based on the JSON file that we provide.
So far, we have made a neat application displaying tasks. Now, instead of loading the local data file, let's use our own REST API. Clone the task application to start. (I will be using code from example two in the directory for Chapter 5, Store Patterns.)
Representational State Transfer (REST) is a set of rules that put constraints on web services. One of the crucial requirements is statelessness, which guarantees the server will not store the client's data, but instead rely only on the request data. This should be sufficient enough to send a reply to the client.
In order to create...