Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c6f2687

Browse files
committed
Refined version of hasBody check.
1 parent 745d347 commit c6f2687

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngResource/resource.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ angular.module('ngResource', ['ng']).
642642
};
643643

644644
forEach(actions, function(action, name) {
645-
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method) || action.hasBody === true;
645+
var hasBody = action.hasBody === true || (action.hasBody !== false && /^(POST|PUT|PATCH)$/i.test(action.method));
646646
var numericTimeout = action.timeout;
647647
var cancellable = isDefined(action.cancellable) ?
648648
action.cancellable : route.defaults.cancellable;

0 commit comments

Comments
 (0)