v1.3.12: bugfix json request
This commit is contained in:
parent
9ab91d9721
commit
1507b38503
8
index.js
8
index.js
|
@ -333,6 +333,9 @@ function setDefaults(defs) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (opts.debug) {
|
||||
console.debug(finalOpts);
|
||||
}
|
||||
req = requester.request(finalOpts, onResponse);
|
||||
req.on('error', cb);
|
||||
|
||||
|
@ -410,7 +413,7 @@ function setDefaults(defs) {
|
|||
|
||||
if (
|
||||
opts.body ||
|
||||
'string' === typeof opts.json ||
|
||||
(opts.json && true !== opts.json) ||
|
||||
opts.form ||
|
||||
opts.formData
|
||||
) {
|
||||
|
@ -434,6 +437,9 @@ function setDefaults(defs) {
|
|||
}
|
||||
}
|
||||
|
||||
if (opts.debug) {
|
||||
reqOpts.debug = opts.debug;
|
||||
}
|
||||
return urequestHelper(reqOpts, cb);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "@root/request",
|
||||
"version": "1.3.12",
|
||||
"lockfileVersion": 1
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@root/request",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"description": "A lightweight, zero-dependency drop-in replacement for request",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
|
Loading…
Reference in New Issue