Etag Header in API Response

What is ETag header and how it works?

ETag stands for entity tag. Etag Header is a response header element which provides a mechanism to cache the unchanged resources. Whenever we make an API call, we can use this header value to track if there is any change in the resource or not. ETag header’s value is an identifier which represents a specific version of the resource.

Here’s an example of ETag header:

 ETag header
Etag header’s value will always remain the same if there is no change in the resource requested in the API call. So whenever we need to make bulk changes based on the API response, we can use this value to identify if there is any changes in the resources since our previous API request. Hence, we can save a lot of time if we need to make several changes in our application based on API call.

Leave a Reply

Your email address will not be published. Required fields are marked *