Skip to content

Commit

Permalink
docs: update http client tip
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Jun 29, 2024
1 parent 131e586 commit a0a2159
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions site/docs/extensions/axios.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Midway 内置了一个简单的 HTTP 请求客户端,无需引入三方包即

默认 Get 请求,返回数据为 Buffer。

内置的 Http 客户端只提供最简单的能力,仅满足大部分的前端接口数据获取,如需复杂的功能,比如文件上传等,请使用其他的客户端,如 fetch,axios,got 等。



### 简单方法形式
Expand Down Expand Up @@ -99,12 +101,6 @@ try {
}
```

:::tip

内置的 Http 客户端只提供最简单的能力,如需复杂的功能(前后拦截或是其他额外的配置),请使用 axios。

:::



### 实例形式
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Midway has a built-in simple HTTP request client, which can be used without intr

The default Get request, and the returned data is Buffer.

The built-in Http client only provides the simplest capabilities and can only meet most of the front-end interface data acquisition needs. If you need complex functions, such as file upload, please use other clients, such as fetch, axios, got, etc.



### Simple method form
Expand Down Expand Up @@ -99,12 +101,6 @@ try {
}
```

:::tip

The built-in Http client only provides the simplest capabilities. If you need complex functions (front and back interception or other additional configurations), please use axios.

:::



### Instance form
Expand Down

0 comments on commit a0a2159

Please sign in to comment.