This blog is in continuation to the previous blog “Getting started with Postman. It gives more information about the interface and basic features of Postman which would help a new user to get started with Postman. I would strongly recommend to read the previous blog and then go through this one for the better understanding
HTTP Protocol
HTTP (HyperText Transfer Protocol) is a protocol for transmitting information over the internet. It is a client-server protocol, meaning that requests are initiated by the client and sent to the server, which then returns a response. HTTP is widely used for web communications, and is also commonly used for APIs (Application Programming Interfaces) as a way of exchanging data between applications.
In the context of APIs, HTTP is used to send requests to an API endpoint and receive a response in return. The client (e.g., a web application or mobile app) sends a request to the server, which then returns a response in the form of data, such as JSON or XML. HTTP provides a set of standard methods, such as GET, POST, PUT, and DELETE, which are used to specify the type of action the client wants to take on the resource identified by the API endpoint. It is a fundamental protocol for API development and is essential for enabling communication between different applications over the internet.
If we try to understand with the help of Tool Rental Store example, the Postman has sent a request to rental store server as it is requesting some data . The server has received the request , understood what we wanted and sent back another message which we call the response . To make this communication possible we have used HTTP which is a communication protocol . Protocol is nothing but a set of rules that both parties usually needs to follow . Most API use HTTP protocol. To be able to read any API documentation it is essential to understand some basics of HTTP
Figure1: HTTP
We can see https in the start of the address which indicates HTTP secure. HTTP secure ensure that any data we send is encrypted.
Request and Response
A request is a message sent by the client to the server, asking it to perform a specific action or return specific information. The request contains information such as the desired resource, the type of action to be performed (e.g., GET, POST, PUT, etc.), and any necessary parameters or data.
A response is the message sent back from the server to the client in response to a request. The response contains information such as the status code indicating the success or failure of the request, the data requested by the client, or any error messages if the request was unsuccessful.
Together, a request and response form a complete transaction between the client and server in which the client makes a request and the server returns a response. This process is repeated for each subsequent request and response in the communication between the client and server.
Let us understand what a request and a response contains
Figure 2: Request and Response
In postman we can select different request methods from this dropdown. By default GET is selected
Figure 3: Request Methods
Once we send the request here is the interface of how we can see. In the upper part of the screen marked by red we can configure the request and the lower part of the screen marked by green is where we can see the response
Figure 4: Collections
In the response lower window we can see status . As in the screenshot we can see “200 ok” which indicates that the server has understood our request and was able to successfully respond to what we wanted
Postman Collection
Postman Collections are a way of organizing and grouping related API requests in Postman. They allow you to save, organize, and reuse your API requests as needed. A collection can contain one or multiple API requests, and each request can have its own unique set of parameters, headers, and other properties. With collections, you can easily manage and organize your API requests for increased productivity, making it easier to keep track of your work and to share your API requests with others. Additionally, collections can be exported and imported between different instances of Postman, making it easy to share your work with others and to collaborate on API development projects.
How to save a postman request
The most important idea when dealing with postman and a collection of requests is that we cannot store a request as an instance in postman; instead, we must add it to the collection. A collection is nothing more than a folder used to hold requests that are connected to one API or another in some way.
In this way we can create a collection
Conclusion
I hope the enthusiasts who are ready to start Postman were helped by this quick read. The fundamental ideas behind HTTP, Request and Response, Collections, and other related terms have been clarified through this blog, which has aided users in properly adjusting to the interface.
Leave A Comment