I'm using Guzzle 6 to communicate with the Youtube API.
I've read about the etags in the YoutubeAPI docs and tried to make it work for me.
First, I tested it at the OAuth 2.0 Playground by Google.
After a few tries I had set it up and the result was following:
It returned successfully 304 for this particular request.
Now I've used this code to recreate above response.
$this->client->get('https://www.googleapis.com/youtube/v3/playlists?part=id,snippet&id=PLQvsw2H5Quochc6RgdIO-zvTKB012BTz1&key=MyApiKey', [
'header' => [
'If-none-match' => "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/FVDC5fyfcQ3KmIbwFIpgNgWJFUo\"",
]
]);
But it always returns an response with a 200 code.
I don't know alot about the HTTP protocol and therefore I'm not sure if I'm missing something..
(either calling with Guzzle or the headers itself)