Working With Postman
Working With Postman
Header
Response
Sidebar
Builder
Header
Postman consists of New, Import, Runner (used to execute tests with Collection Runner), Open New,
Interceptor, Sync menus, and so on. It shows the workspace name – My Workspace along with the option
for Invite for sharing it among teams.
New menu is used to create a new Environment, Collection or request. The Import menu helps to import
an Environment/Collection.
We can import from a File, Folder, Link, Raw text or from Code repository options which are also
available under Import.
Here, Open New is used to open a new tab, Postman or a Runner Window.
Response:
Response section shall have values populated only when a request is made.
Sidebar
Sidebar consists of Collections (used to maintain tests, containing folders, sub-folders,
requests), History (records all API requests made in the past), and APIs
Builder
Builder is the most important section of the Postman application. It has the request tab and displays the
current request name. By default, Untitled Request is mentioned if no title is provided to a request.
The Builder section also contains the request type (GET, POST, PUT, and so on) and URL. A
request is executed with the Send button. If there are any modifications done to a request, we
can save it with the Save button.
The Builder section has the tabs like Param, Authorization, Headers, Body, Pre-req., Tests and Settings.
The parameters of a request in a key-value pair are mentioned within the Params tab. The Authorization
for an API with username, password, tokens, and so on are within the Authorization tab.
The request headers, body are defined within the Headers and Body tab respectively. Sometimes, there
are pre-condition scripts to be executed prior to a request. These are mentioned within the Pre-req. tab.
The Tests tab contains scripts that are run when a request is triggered. This helps to validate if the API is
working properly and the obtained data and Response code is correct.
GET: This HTTP method is used to access the data from an API.
Open the request you want to use for a code snippet, then select the code icon in the right
pane.
Select the copy icon to copy the code snippet to your clipboard.
For more configuration options, like the indentation type and count, select the
settings icon next to the dropdown list. The settings vary based on the chosen
language or framework.