4

谁能告诉我如何为这个网址正确传递 etag ?

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&playlistId=UUwpy_3CqtfwM7tg2JgQQQyA&maxResults=50&key= {API_KEY}。

我就是这样通过的,但是没有用。

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&playlistId=UUwpy_3CqtfwM7tg2JgQQQyA&maxResults=50&key= {API_KEY}&If-None-Match="p4VTdlkQv3HQeTEaXgvLePAydmU/vKZr9jiSytaO7UdTbhKbIrwbX20"

4

1 回答 1

0

If-None-Match 是请求标头,而不是查询参数。需要在headers请求中设置此标头。https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader

于 2020-02-19T12:23:41.080 回答