0

I'm trying to make a simple post request in Angular and acquire the response the headers. The problem is I get this response for the header:

function (d){b||(b=fd(a));return d?(d=b[G(d)],void 0===d&&(d=null),d):b}

Angular code:

$http.get(url).success(function(data, status, headers, config) {
    callback(data, status, headers, config);
});

What am I missing?

ajgisme
  • 1,615
  • 2
  • 14
  • 28

2 Answers2

1

My colleague found the answer: the response was a function so should therefore be run as a function. So to get the value of the headers I used this:

$scope.results = headers();
ajgisme
  • 1,615
  • 2
  • 14
  • 28
0

AngularJs v1.7.5

 $http({
      ...
      }).then(function success(data) {
            var heder=data.headers();
         }
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
ervin
  • 1