I'm using HttpClient to request a json
file. I want the file can be cached with ETag
. But it not works. I think that The If-None-Match
not send to the server is the reason. So I want to get The 'ETag' from response headers. But the response header not has the item in Angular, But It's truly in the HTTP response in chrome network tool. All of showing in follow images.
How can I get the ETag from response Header
I think it's similar to this : HttpClient dont return all headers .
You need to setup your backend to return Access-Control-Expose-Headers:ETag
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.