unprint 0.15.1 → 0.15.2

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 +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
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
@@ -1015,6 +1015,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
1015
1015
  const { limiter, interval, concurrency } = getLimiter(url, options);
1016
1016
 
1017
1017
  const instance = axios.create({
1018
+ method,
1018
1019
  data: body,
1019
1020
  validateStatus: null,
1020
1021
  headers: options.headers,
@@ -1037,7 +1038,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
1037
1038
 
1038
1039
  events.emit('requestInit', feedbackBase);
1039
1040
 
1040
- const res = await limiter.schedule(async () => instance.get(url));
1041
+ const res = await limiter.schedule(async () => instance.request(url));
1041
1042
 
1042
1043
  if (!(res.status >= 200 && res.status < 300)) {
1043
1044
  handleError(new Error(`HTTP response from ${url} not OK (${res.status} ${res.statusText}): ${res.data}`), 'HTTP_NOT_OK');