Postman is a service used for manual and automated testing for HTTP APIs. You can use it:
- To execute queries through a user-friendly web interface
- To create tests that check APIs' operation automatically
- To do much more
Postman isn't the only service of its kind but the most popular one.
Postman works in workspaces. By default, after registering, you'll already have My Workspace created for personal tasks and experiments.
Inside the workspace, in the center of the screen, there's a block where you can create tabs and make HTTP requests.
Each tab describes a specific query that we want to make. It is the central part of the whole service. Here you specify the URL, HTTP method, headers, and all the parameters to perform the request.
Once the request is defined, we can press send to execute it. At the bottom, you'll see a formatted version of the answer. In addition to the HTTP response, Postman shows the amount of data transferred, the request time, and other parameters.
The best way to learn the Postman interface is through experimentation. Try making several different requests to dummyjson using the most complex requests, including:
- Request parameters
- Body
- POST, DELETE, and PUT methods
- Token authentication
Running queries through Postman is not technically different from working with Curl, except for the convenience of entering information using the web interface. The main advantage, however, is the ability to describe the API of a service as a whole thing. You'll easily be able to return to this description, either for experiments or tests. In Postman's terms, such a description is called a collection.
A collection consists of a set of endpoints. We can link it by a single authentication method, query parameters, variables (to substitute values in the URL), and other elements. All this is set in the settings for the collection or for the specific endpoints.
These are just the basic features of Postman. The advanced ones include tools for:
- API design and testing
- Backend emulation if there's no API
- API operability monitoring
- And much more
Do it yourself
- Register with Postman
- Create a collection for the API https://dummyjson.com/
Recommended materials
Are there any more questions? Ask them in the Discussion section.
The Hexlet support team or other students will answer you.
- Article “How to Learn and Cope with Negative Thoughts“
- Article “Learning Traps“
- Article “Complex and simple programming tasks“
For full access to the course you need a professional subscription.
A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.