Postman API Tutorial – Sending Request

Postman can be defined as a tool or you can say a GUI through which you can send HTTP requests and receive HTTP responses.

It is basically used for testing web services whether hosted by us in the local host or a remote web service.

Let’s look at an example in which we will see the Postman GUI to send request.

As per the above screenshot,

Request Type : POST

Web Service URL : https://techfinanceworld.stocks.com/stock/getPrice

Since it is POST, the request parameters ould be sent in the Body instead of the url. If it was GET, the parameters would had been sent in the URL concnatenated as a query string.

Let’s see the both the Request Types in Detail.

GET:

In this request type, the parameters are sent in the url in the form of a query string.

KIndly check the below screenshot.

The parameters symbol and currency are entered in the params tab of the Postman Request UI. The same is concatenated in the url after the ? and sepaarted by &.

POST:

In this request type, the parameters are sent in the body of the request.

KIndly check the below screenshot.

Let’s look at the header’s tab.

You can see 2 properties in this tab.

Content-Type: It defines the type in which request would be sent. In the above case, it is application/json which means request would be sent as an json payload.

Accept: It defines the type in which response would be received. In the above case, it is application/json which means response would be received as an json .

Response would be received in an repsonse panel just below the request panel.