Skip to content

Commit abb8ce5

Browse files
authored
Merge pull request #689 from khaledkhalil94/patch-1
Added condition to exclude body from GET requests
2 parents 493525b + 188196e commit abb8ce5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ global.REQUEST = exports.request = function(url, flags, data, callback, cookies,
607607
data = '';
608608
}
609609

610-
if (type === 1 && !data && (data === EMPTYOBJECT || data === '' || data === undefined))
610+
if (type === 1 && !data && (data === EMPTYOBJECT || data === '' || data === undefined) && options.post)
611611
data = BUFEMPTYJSON;
612612
}
613613

@@ -6215,4 +6215,4 @@ exports.reader = function() {
62156215
const BUFEMPTYJSON = exports.createBuffer('{}');
62166216

62176217
global.WAIT = exports.wait;
6218-
!global.F && require('./index');
6218+
!global.F && require('./index');

0 commit comments

Comments
 (0)