I have an angular app which talks to my rails api via ng resource. In my response I set etag in my header which I get in my response headers but while making the same query again If-None-Match header is not set and in turn my caching doesn't works whereas when i make requests directly via the browser it works correctly. How can I set the received etag in my request headers with $resource
Asked
Active
Viewed 2,957 times
1 Answers
1
$resource
doesn't natively support etags, one way of doing it is using $cachefactory
and interceptors
. I did a similar thing for a project but your mileage may vary.
For a better solution look at Restangular or angular-data.

mxp
- 180
- 6