etherreq 1.0.6 → 1.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etherreq",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A lightweight custom HTTP request library.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/types/etherreq.d.ts",
@@ -1,4 +1,4 @@
1
- // src/myaxios.js
1
+ // src/etherreq.js
2
2
 
3
3
  export const create = (defaultConfig = {}) => {
4
4
  const interceptors = {
@@ -47,6 +47,7 @@ if (!res.ok) {
47
47
  status: res.status,
48
48
  statusText: res.statusText,
49
49
  headers: res.headers,
50
+ config,
50
51
  };
51
52
  } catch (error) {
52
53
  // 响应拦截器 - 错误处理
package/src/request.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/request.js
2
- import { create } from './myaxios';
2
+ import { create } from './etherreq';
3
3
  import { requestCache, getCacheKey } from './cache';
4
4
 
5
5
  // 创建一个带有默认配置的请求实例