fix: don't JSON.stringify a string body, duh
This commit is contained in:
parent
bc4f6e59c0
commit
ba60df7eab
2
index.js
2
index.js
|
@ -280,7 +280,7 @@ function setDefaults(defs) {
|
||||||
var requester;
|
var requester;
|
||||||
|
|
||||||
if (opts.body) {
|
if (opts.body) {
|
||||||
if (true === opts.json) {
|
if (true === opts.json && 'string' !== typeof opts.body) {
|
||||||
_body = JSON.stringify(opts.body);
|
_body = JSON.stringify(opts.body);
|
||||||
} else {
|
} else {
|
||||||
_body = opts.body;
|
_body = opts.body;
|
||||||
|
|
Loading…
Reference in New Issue