Before https://github.com/angular/angular.js/commit/5da1256fc2812d5b28fb0af0de81256054856369, it used to be possible to do this: ``` function requestTransform(data, headers) { headers = angular.extend(headers(), { 'X-MY_HEADER': 'abcd' }); } return angular.isObject(data) ? angular.toJson(data) : data; } ``` This is because the headersGetter used to re-use the argument instead of declaring a new one: https://github.com/angular/angular.js/commit/5da1256fc2812d5b28fb0af0de81256054856369#diff-748e0a1e1a7db3458d5f95d59d7e16c9L71 /cc @pkozlowski-opensource
Before 5da1256, it used to be possible to do this:
This is because the headersGetter used to re-use the argument instead of declaring a new one: 5da1256#diff-748e0a1e1a7db3458d5f95d59d7e16c9L71
/cc @pkozlowski-opensource