unprint 0.15.4 → 0.15.5

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.15.4",
3
+ "version": "0.15.5",
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
@@ -1014,7 +1014,6 @@ async function request(url, body, customOptions = {}, method = 'GET') {
1014
1014
 
1015
1015
  const instance = axios.create({
1016
1016
  method,
1017
- data: body,
1018
1017
  validateStatus: null,
1019
1018
  headers: options.headers,
1020
1019
  timeout: options.timeout,
@@ -1036,7 +1035,10 @@ async function request(url, body, customOptions = {}, method = 'GET') {
1036
1035
 
1037
1036
  events.emit('requestInit', feedbackBase);
1038
1037
 
1039
- const res = await limiter.schedule(async () => instance.request(url));
1038
+ const res = await limiter.schedule(async () => instance.request({
1039
+ url,
1040
+ data: body,
1041
+ }));
1040
1042
 
1041
1043
  if (!(res.status >= 200 && res.status < 300)) {
1042
1044
  handleError(new Error(`HTTP response from ${url} not OK (${res.status} ${res.statusText}): ${res.data}`), 'HTTP_NOT_OK');