Make Selenium Easy

Postman Tutorial Part 6 – Understand HTTP Headers in API

Hello Folks,

We have already learnt about :

Sending GET request in Postman.

Sending POST request in Postman.

If you notice, you can see a “Headers” tab in both request and response section of Postman. When you click on that tab you can see many key-value pairs.

We will see about headers in this post. This is also an interview question.

“Headers” or “HTTP Headers” are key – value pairs which are used by Server and Client to exchange additional information about Request and Response. We can also say that headers are metadata of Request and Response. 

Some headers you need to pass in Request and some headers are automatically added at run time with request. When response body is returned, it also includes many headers.

In above image, “Authorization” is a header of request which is automatically added when we pass access token. When we hit Get request, we got response. This response contains 16 headers (Server, Date etc.).

Some important headers are:

  1. Authorization
  2. Content-ID
  3. Content-Length
  4. Content-Type
  5. Date
  6. Connection
  7. Accept
  8. If-Match
  9. If-None-Match
  10. Location
  11. Range

 

More about API Testing in upcoming posts. Stay tuned.

If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.
#ThanksForReading
#HappyApiTesting

Table of Contents

Author: Amod Mahajan

A software Tester who is paid to judge products developed by others. Currently getting paid in American Dollars. Writing technical posts and creating YouTube videos are my hobbies.

Leave a Reply

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.

Postman Tutorial Part 6 – Understand HTTP Headers in API

by Amod Mahajan time to read: 1 min
0
%d bloggers like this: