etherreq 1.0.36 → 1.0.37

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 +5 -2
  2. package/src/etherreq.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etherreq",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "A lightweight custom HTTP request library.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/types/etherreq.d.ts",
@@ -12,5 +12,8 @@
12
12
  "request"
13
13
  ],
14
14
  "author": "guochang2635@icloud.com",
15
- "license": "MIT"
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "etherreq": "^1.0.35"
18
+ }
16
19
  }
package/src/etherreq.js CHANGED
@@ -42,6 +42,8 @@ const dispatchRequest = async (config) => {
42
42
 
43
43
  // 判断是否是 HTML 内容
44
44
  if (text.trim().startsWith('<')) {
45
+ console.log(text);
46
+
45
47
  throw new Error('服务器返回了 HTML 页面,预期为 JSON 格式');
46
48
  }
47
49