diff options
| author | Karl Seamon | 2011-07-29 18:32:30 -0400 | 
|---|---|---|
| committer | Igor Minar | 2011-08-19 01:20:45 -0700 | 
| commit | 4ec1d8ee86e3138fb91543ca0dca28463895c090 (patch) | |
| tree | 9f7fff13f177317ff15f8804789a44576a151908 /src/Resource.js | |
| parent | c37bfde9eb31556ee1eb146795b0c1f1504a4a26 (diff) | |
| download | angular.js-4ec1d8ee86e3138fb91543ca0dca28463895c090.tar.bz2 | |
feat($xhr,$resource): expose response headers in callbacks
all $xhr*, $resource and related mocks now have access to headers from
their callbacks
Diffstat (limited to 'src/Resource.js')
| -rw-r--r-- | src/Resource.js | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/Resource.js b/src/Resource.js index 74d952ed..4bf5cf65 100644 --- a/src/Resource.js +++ b/src/Resource.js @@ -111,7 +111,7 @@ ResourceFactory.prototype = {            action.method,            route.url(extend({}, action.params || {}, extractParams(data), params)),            data, -          function(status, response) { +          function(status, response, responseHeaders) {              if (response) {                if (action.isArray) {                  value.length = 0; @@ -122,7 +122,7 @@ ResourceFactory.prototype = {                  copy(response, value);                }              } -            (success||noop)(value); +            (success||noop)(value, responseHeaders);            },            error || action.verifyCache,            action.verifyCache); | 
