This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,8 @@ function shallowClearAndCopy(src, dst) {
193
193
* - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
194
194
* `response` and `responseError`. Both `response` and `responseError` interceptors get called
195
195
* with `http response` object. See {@link ng.$http $http interceptors}.
196
+ * - **`hasBody`** - `{boolean}` - allows to specify if a request body is to be used (not
197
+ * required for POST,PUT,PATCH and can't disable body inclusion on this methods).
196
198
*
197
199
* @param {Object } options Hash with custom settings that should extend the
198
200
* default `$resourceProvider` behavior. The supported options are:
@@ -640,7 +642,7 @@ angular.module('ngResource', ['ng']).
640
642
} ;
641
643
642
644
forEach ( actions , function ( action , name ) {
643
- var hasBody = / ^ ( P O S T | P U T | P A T C H ) $ / i. test ( action . method ) ;
645
+ var hasBody = / ^ ( P O S T | P U T | P A T C H ) $ / i. test ( action . method ) || action . hasBody === true ;
644
646
var numericTimeout = action . timeout ;
645
647
var cancellable = isDefined ( action . cancellable ) ?
646
648
action . cancellable : route . defaults . cancellable ;
You can’t perform that action at this time.
0 commit comments