$resource should provide http status codes or at least a better option to include them #8439
Description
Hello all,
$resource
for creating resource objects should allow you to retrieve the status codes coming back from REST endpoints. While there is interceptor
with individual rest verbs while setting up $resource
, that becomes a pain to add it each time. It should be as simple as passing an argument to the constructor or being able to modify the $resource
globally so all responses give back the status. What I have found is trying to use interceptors with $resource
doesn't work as expected.
Literally, all I am doing is this to currently get back the status for $resource
when the data comes back:
'get': {
interceptor: {
response: function (response) {
return response;
}
}
}
As I mentioned earlier, this is a bit tedious.
In my case, I don't want to use $http
because of all of the benefit I get from using $resource
in the first place.