Open In App

Sending Your First Request via Postman

Last Updated : 10 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Postman is a tool that we are using for managing our APIs. It is used for sending the request to the server and then looking at the response from it. It helps us to understand the behavior of the API. Postman can help us with Performance Testing, Managing the API in one place, and sharing the collections with our team members.

Sending Your First Request via Postman

Creating our First Request

1. On the top bar click on the + to create a request.

2. A new tab with the empty request will be open which is shown in the image shown below:

First Request

Empty Request

Components of Request

  1. Name of the Request: On top where “Untitled Request” is written we can give the name of our request.
  2. Method Type: By Default, the method type will be “Get” but we can change it as per our need
  3. URL of the Request: In the text box we will give the URL of the request.
  4. Send Button: This will send the request with all the payloads to the URL given.
  5. Navbar for creating a Payload:
    1. Params: If any query parameter has to be passed like “id” then we can pass it from here.
    2. Authorization: If the API asks for any authentication like the Bearer token then we have to give those tokens over here.
    3. Headers: It contains all the headers which are required at the server end.
    4. Body: If any body or JSON data has to pass Like in Post request we will pass any data to create then it will be placed here.
    5. Pre-Request Script: This is a script that runs before the request is sent.
    6. Tests: Basics tests like validating JSON response or checking status code we can do all such validations here. You can read more this about here.
  6. Settings: Here are some basic and advanced settings, like enabling the SSL section and more.

With this, we can request to our server and receive a response. For looking at what are the components present in the response window, let us first make a request call. If you have any API created then you can go with that. I am using a Postman API which is used for demonstrations.

URL of the API: “postman-echo.com/get”

Just Paste this URL in the Text box. And hit the send Button.

This API is for the “Get” method and thus we don’t have to change the method type, but if your API is POST or PUT then you can select from the dropdown.

Sending the First Request

When we hit the Send button within some milliseconds some response will be shown to us in the response window with some other tabs like Cookies, Headers, Status and many more.

Request-Made

First Request

Breakdown of the Response Component

  1. Body: All the responses whether the JSON or the error object will be shown here. It contains options like Pretty, Raw, Preview, and Visualize, which are used for different response formats.
  2. Cookies: If your API creates any cookie like after making legitimate authentication some applications create HTTP cookies for that. Thus, such cookies can be seen here.
  3. Headers: The headers sent with the API response are seen here.
  4. Tests: Results of the test which we had created in the request section are shown here.
  5. Status Code: It shows the status of the functionality.
  6. Time: The response time, which is the time taken to give the response is metered and shown here.
  7. Size: The size of the response is shown.

This is some basic information that we should have idea with making the first request in the postman and with this knowledge we can handle the basic work of the API management and ensure the working of our API.

Conclusion

Postman is not only about this but this is the basics of it and for more, you can learn about the Postman Collections. Postman comes up with so many features to manage the API and make a very easy process of working with APIs.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads