DEV Community

Cover image for Postman Hacks
Abayomi Ogunnusi
Abayomi Ogunnusi

Posted on

Postman Hacks

Postman is an API platform that allows you to create and use APIs.

Postman streamlines collaboration and simplifies each phase of the API lifecycle, allowing you to design better APIs faster. Let's start testing.

testing

Table Of Content
🥦 Environment variables
🥦 Generating random names
🥦 Postman Console
🥦 Path variable


Environment variables

Duplicating codes and links during API testing is always a hassle.
First, highlight the url and set it as a variable.

Image description


Now imagine writing this whole baseUrl for every instances of GET, POST, DELETE, PUT and PATCH request. It get tiresome. There is a hack to this.

Image description

Image description

Image description


Also, when you can set token as variable with few steps. Highlight the token and set it as a variable.
Image description

Image description

Image description

Image description


Generating random names

This is my favorite, ever want to register new users and your brain just ran out of John Doe. Do not worry, help is on the way. This generate random name and email

Image description


Postman Console

Postman also has its own console, where you may see a log of server responses.
Image description

Image description


Path variable

Image description

Conclusion

This is just a quick overview of what you can do with Postman to test APIs.
Googling what postman can accomplish will provide you with more functionality.
Thank you for taking the time to read this.

Top comments (2)

Collapse
 
drsimplegraffiti profile image
Abayomi Ogunnusi

Insomnia is cool too...thanks for your contribution

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

I would also suggest trying Insomnia - it's very similar but easier to use and more powerful IMO