Compare commits

...

2 Commits

Author SHA1 Message Date
AJ ONeal 0a2e7afa76
1.8.1 2022-01-12 12:45:07 -07:00
AJ ONeal ba60df7eab
fix: don't JSON.stringify a string body, duh 2022-01-12 12:42:34 -07:00
3 changed files with 3 additions and 3 deletions

View File

@ -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;

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "@root/request", "name": "@root/request",
"version": "1.8.0", "version": "1.8.1",
"lockfileVersion": 1 "lockfileVersion": 1
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@root/request", "name": "@root/request",
"version": "1.8.0", "version": "1.8.1",
"description": "A lightweight, zero-dependency drop-in replacement for request", "description": "A lightweight, zero-dependency drop-in replacement for request",
"main": "index.js", "main": "index.js",
"files": [ "files": [