diff --git a/poly/request.js b/poly/request.js index 602d230..9786b04 100644 --- a/poly/request.js +++ b/poly/request.js @@ -1,9 +1,8 @@ const https = require('https'); -const querystring = require("querystring"); // Generic polyfill for "request" npm package, wrapper for https const nodeReq = ({ method, url, headers, qs, timeout, body, stream }) => new Promise((resolve) => { - const fullUrl = `${url}${qs != null ? `?${querystring.stringify(qs)}` : ''}`; // With query string + const fullUrl = `${url}${qs != null ? `?${(new URLSearchParams(qs)).toString()}` : ''}`; // With query string let req; try {