Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$resource should provide http status codes or at least a better option to include them #8439

Closed
@sethen

Description

@sethen

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions