I\'m willing to retrieve the response header of a resource request, cause I\'ve put pagination information and something else in it rather than the response body, to make the RE
We can't use .then
for returning the header because the promise doesn't allow for multiple return values. (e.g., (res, err)
)
This was a requested feature, and was closed https://github.com/angular/angular.js/issues/11056
... the
then
"callbacks" can have only [one] argument. The reason for this is that those "callbacks" correspond to the return value / exception from synchronous programming and you can't return multiple results / throw multiple exceptions from a regular function.