Working with REST
The most common API we will work with is the REST API. We most frequently encounter REST APIs when we use web applications. A web application is usually a tiered client/server application. A typical application would consist of three tiers or layers:
- A presentation layer – the web browser or app on the client device
- An application layer – the web server
- A storage layer – usually a database running on the web server or a separate server
We use REST APIs to communicate between the presentation layer (the browser) and the application layer (the web server); how the application layer communicates with the storage layer (the database) is up to the application developer, but it will often be Python or PHP.
REST APIs are usually implemented using HTTP, which means they use a familiar set of HTTP commands such as GET
, PUT
, and POST
. Because of the way web applications are usually designed, REST APIs are frequently associated...