From bd861e51611423678b4d6124085072aead4b18bb Mon Sep 17 00:00:00 2001 From: Hamid Sekandari Date: Tue, 11 Jan 2022 18:17:45 +0330 Subject: [PATCH] fix: bugfixed for opts.json and now supports (opt.json = false) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fb2d399..6a70155 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports = function request (opts, cb) { }) if (!opts.clientOpts) opts.clientOpts = {} - if (!opts.json) opts.json = true + opts.json = !!opts.json var reqHeaders = Object.assign({ ':method': opts.method || 'GET' }, opts.headers)