From 8336b3a286f8469d4cd7c412c41ca8c1a31fecf0 Mon Sep 17 00:00:00 2001 From: Jen Bourey Date: Fri, 4 Oct 2013 12:02:18 -0700 Subject: 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 --- src/ngResource/resource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ngResource/resource.js') 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) { -- cgit v1.2.3