fix: don't JSON.stringify a string body, duh

This commit is contained in:
AJ ONeal 2022-01-12 12:42:34 -07:00
parent bc4f6e59c0
commit ba60df7eab
Signed by: coolaj86
GPG Key ID: 585419CA6DB0AA23
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ function setDefaults(defs) {
var requester;
if (opts.body) {
if (true === opts.json) {
if (true === opts.json && 'string' !== typeof opts.body) {
_body = JSON.stringify(opts.body);
} else {
_body = opts.body;