Introducing web services
Before we build a modern web service, we need to cover some background to set the context for this chapter.
Aspects of RESTful services
REST is an architectural style for designing networked applications, particularly web services. It was introduced by Roy Fielding in his doctoral dissertation in 2000, and its principles are widely adopted today in web service development. Let’s review REST's key architectural aspects.
Statelessness
RESTful services are stateless, meaning each request from a client to the server must contain all the information needed to understand and process the request. The server doesn't store any session information between requests.
For example, if a client sends a request to retrieve a user’s profile, it must include everything the server needs like authentication, user ID, and so on. The server doesn't rely on previous interactions to process the request.
The benefit of this aspect is scalability. Since the...