aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngResource/resource.js
diff options
context:
space:
mode:
authorSudhir Jonathan2012-11-27 11:54:35 +0530
committerPawel Kozlowski2012-11-30 22:58:11 +0100
commit8991680d8ab632dda60cd70c780868c803c74509 (patch)
tree70f8f12fe480f37a3ee085ff670890e81c9f5048 /src/ngResource/resource.js
parentec801ac13782f3f488915d682d6d2a73e2d76efd (diff)
downloadangular.js-8991680d8ab632dda60cd70c780868c803c74509.tar.bz2
fix($resource): HTTP method should be case-insensitive
Perform call `angular.uppercase` on all given action methods. Closes #1403
Diffstat (limited to 'src/ngResource/resource.js')
-rw-r--r--src/ngResource/resource.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index 878a6b6e..4c2a8dc1 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -330,6 +330,7 @@ angular.module('ngResource', ['ng']).
}
forEach(actions, function(action, name) {
+ action.method = angular.uppercase(action.method);
var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH';
Resource[name] = function(a1, a2, a3, a4) {
var params = {};