diff options
| author | Jen Bourey | 2013-10-04 12:02:18 -0700 | 
|---|---|---|
| committer | Jeff Cross | 2013-10-04 16:50:08 -0700 | 
| commit | 8336b3a286f8469d4cd7c412c41ca8c1a31fecf0 (patch) | |
| tree | 95c1b3a8340226b7a1cd6d495bea8cda03930ac0 /src/ngResource/resource.js | |
| parent | 49e06eace58d871972f0cf3ec92aa28e19c4b02b (diff) | |
| download | angular.js-8336b3a286f8469d4cd7c412c41ca8c1a31fecf0.tar.bz2 | |
fix(ngResource): Remove request body from $delete
Prevent the  obj.$delete instance method from sending the resource as the request body.  This commit uses the existing hasBody boolean to only set httpConfig.data for methods which should have a request body.
Closes #4280
Diffstat (limited to 'src/ngResource/resource.js')
| -rw-r--r-- | src/ngResource/resource.js | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index a86c00ec..d330f737 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -466,7 +466,7 @@ angular.module('ngResource', ['ng']).              }            }); -          httpConfig.data = data; +          if (hasBody) httpConfig.data = data;            route.setUrlParams(httpConfig, extend({}, extractParams(data, action.params || {}), params), action.url);            var promise = $http(httpConfig).then(function(response) { | 
