I am trying to understand how etag works with the Youtube API. Here is the request I am making:
curl -X GET \
'https://www.googleapis.com/youtube/v3/channels?part=statistics&fields=items&id=UCmRtPmgnQ04CMUpSUqPfhxQ' \
-H 'Authorization: Bearer dezferfnr....' \
-H 'Cache-Control: no-cache' \
-H 'If-None-Match: \"g7k5f8kvn67Bsl8L-Bum53neIr4/4ygpLCFz2IoIJNkG3XO1Pys1hck\"'
And here is the response I am getting:
{
"items": [
{
"kind": "youtube#channel",
"etag": "\"g7k5f8kvn67Bsl8L-Bum53neIr4/4ygpLCFz2IoIJNkG3XO1Pys1hck\"",
"id": "UCmRtPmgnQ04CMUpSUqPfhxQ",
"statistics": {
"viewCount": "4757859",
"commentCount": "63",
"subscriberCount": "68151",
"hiddenSubscriberCount": false,
"videoCount": "898"
}
}
]
}
As you can see, the etag found in the response is the same as the one I sent in the request's header, and I can't understand why I am not getting an HTTP 304 response (Not Modified) instead.