diff --git a/poly/request.js b/poly/request.js index 38d20fc..daa4c99 100644 --- a/poly/request.js +++ b/poly/request.js @@ -1,12 +1,12 @@ const https = require('https'); // Generic polyfill for "request" npm package, wrapper for https -const nodeReq = ({ method, url, headers, qs, timeout, body, stream }) => new Promise((resolve) => { +const nodeReq = ({ method, url, headers, qs, timeout, body }) => new Promise((resolve) => { let req; try { req = https.request(url + (qs != null ? `?${(new URLSearchParams(qs)).toString()}` : ''), { method, headers, timeout }, async (res) => { const loc = res.headers.location; - if (loc) return resolve(await nodeReq({ url: loc, method, headers, timeout, body, stream })); + if (loc) return resolve(await nodeReq({ url: loc, method, headers, timeout, body })); resolve(res); });