unprint 0.10.1 → 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 +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.10.1",
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');
@@ -788,9 +790,11 @@ async function request(url, body, customOptions = {}, method = 'GET') {
788
790
  method,
789
791
  data: body,
790
792
  validateStatus: null,
793
+ ...options,
791
794
  timeout: options.timeout,
792
795
  signal: options.abortSignal,
793
- ...options,
796
+ httpAgent: new http.Agent({ ...options.agent }),
797
+ httpsAgent: new https.Agent({ ...options.agent }),
794
798
  });
795
799
 
796
800
  if (!(res.status >= 200 && res.status < 300)) {