Testing APIs with Postman
Postman has a simple user interface that allows us to easily test APIs by sending HTTP requests. For example, checking whether we are receiving the correct data from the endpoint with the GET
method takes only three steps without writing any JavaScript code:
- Adding the endpoint
- Choosing the
HTTP
method - Clicking the
Send
button
To install Postman, go to the download page, https://www.getpostman.com/downloads/, and follow the instructions.
Note
Postman is available on Mac, Windows, and Linux. At the time of writing this book, the stable version of Postman is 7.5.0.
Once installed, launch Postman and you will see the interface shown here:
Now let's make the same requests we have done in the previous sections using Postman. In the following exercise, we are going to practice all of the HTTP methods we have learned previously in the Five Common HTTP Methods...