unprint 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {
package/src/app.js CHANGED
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const { JSDOM, VirtualConsole } = require('jsdom');
4
+ const http = require('http');
5
+ const https = require('https');
4
6
  const axios = require('axios').default;
5
7
  const moment = require('moment-timezone');
6
8
  const merge = require('deepmerge');
@@ -791,8 +793,8 @@ async function request(url, body, customOptions = {}, method = 'GET') {
791
793
  ...options,
792
794
  timeout: options.timeout,
793
795
  signal: options.abortSignal,
794
- httpAgent: options.httpAgent,
795
- httpsAgent: options.httpsAgent,
796
+ httpAgent: new http.Agent({ ...options.agent }),
797
+ httpsAgent: new https.Agent({ ...options.agent }),
796
798
  });
797
799
 
798
800
  if (!(res.status >= 200 && res.status < 300)) {