From ba60df7eab22f0582ad40c538066f2319878ee80 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 12 Jan 2022 12:42:34 -0700 Subject: [PATCH] fix: don't JSON.stringify a string body, duh --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2bc0765..40284b0 100644 --- a/index.js +++ b/index.js @@ -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;