unprint 0.19.18 → 0.19.20

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 +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.19.18",
3
+ "version": "0.19.20",
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
@@ -1225,10 +1225,10 @@ async function getBrowserContext(browser, options, useProxy) {
1225
1225
  server: `${options.proxy.host}:${options.proxy.port}`,
1226
1226
  },
1227
1227
  }),
1228
- extraHTTPHeaders: {
1228
+ extraHTTPHeaders: curateHeaders({
1229
1229
  ...options.headers,
1230
1230
  cookie: getCookie(options),
1231
- },
1231
+ }, options),
1232
1232
  });
1233
1233
  }
1234
1234
 
@@ -1654,7 +1654,7 @@ async function request(url, customOptions = {}, redirects = 0) {
1654
1654
  ) {
1655
1655
  const newUrl = new URL(res.headers.location, url).toString();
1656
1656
 
1657
- return request(newUrl, body, options, method, redirects + 1);
1657
+ return request(newUrl, customOptions, redirects + 1);
1658
1658
  }
1659
1659
 
1660
1660
  const data = options.interface === 'fetch'