mirror of
https://git.coolaj86.com/coolaj86/request.js
synced 2025-04-20 06:10:38 +00:00
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…
x
Reference in New Issue
Block a user