kbfetch 0.0.18 → 0.0.19
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/README.md +2 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
`kbfetch` 一个轻量基于fetch封装的API请求工具库。
|
|
4
|
-
|
|
5
|
-
## 安装引用
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install kbfetch
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```javascript
|
|
12
|
-
import kbfetch from 'kbfetch'
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 使用示例
|
|
1
|
+
#### 使用示例
|
|
16
2
|
|
|
17
3
|
发起 GET 请求的示例:
|
|
18
4
|
|
|
@@ -44,7 +30,7 @@ const ft = kbfetch.g('https://api.example.com/data', { params: { id: 1 }, timeou
|
|
|
44
30
|
ft.abort()
|
|
45
31
|
```
|
|
46
32
|
|
|
47
|
-
|
|
33
|
+
#### 自定义选项
|
|
48
34
|
|
|
49
35
|
`KbFetchInit` 类型扩展了标准的 `RequestInit`,添加了一些可选的便捷属性:
|
|
50
36
|
|