I am unable to find a way to read the response headers when using SpringDataRestAdapter and $http. I can successfully read and process the response object, but I need to be able to store the ETag that is return in the HTTP Header.
I can't find any mention of HTTP Headers, anybody know how to get to them?
function getData(uri) {
var deferred = $http({
method: 'Get',
url: uri
});
return SpringDataRestAdapter.process(deferred).then(function (processedResponse) {
return processedResponse;
});
}
Theoretically you should be able to chain
thento your$httpGET call and use the result promise as an input toSpringDataRestAdapter. Something like this:BTW, you can also use a shorthand for
$httpcall: