Skip to content

Full response only for getList() request #1139

@ajfranzoia

Description

@ajfranzoia

Hello. I'm trying to migrate from Angular $resource to Restangular.
I'm facing some difficulties trying to reproduce this behavior:

MyResource.query({}, function(data, headers) {
  vm.items = data;
  vm.customStatus = headers('My-Custom-Header');
});

I want only for some certain requests to be able to inspect the full response data (and read its headers). I've found that setFullResponse() with addResponseInterceptor() is the way to go, but I can't get it working for a single request.
I'm using Decoupled Services, is this possible to make? Or I must use the main Restangular service?
Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions