bugfix: don't default to POST when json: true

This commit is contained in:
AJ ONeal 2018-07-06 22:31:37 -06:00
parent f81dce9786
commit 5150e076cb
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ function setDefaults(defs) {
}
}
if (opts.body || opts.json || opts.form || opts.formData) {
if (opts.body || 'string' === typeof opts.json || opts.form || opts.formData) {
reqOpts.method = (reqOpts.method || 'POST').toUpperCase();
} else {
reqOpts.method = (reqOpts.method || 'GET').toUpperCase();