We have already learnt about :
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:
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.