mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Add kernel API /api/network/forwardProxy https://github.com/siyuan-note/siyuan/issues/8724
This commit is contained in:
parent
c78cbe067d
commit
5d7c6d47bf
3 changed files with 106 additions and 9 deletions
48
API_zh_CN.md
48
API_zh_CN.md
|
|
@ -52,6 +52,8 @@
|
|||
* [通知](#通知)
|
||||
* [推送消息](#推送消息)
|
||||
* [推送报错消息](#推送报错消息)
|
||||
* [网络](#网络)
|
||||
* [正向代理](#正向代理)
|
||||
* [系统](#系统)
|
||||
* [获取启动进度](#获取启动进度)
|
||||
* [获取系统版本](#获取系统版本)
|
||||
|
|
@ -1197,6 +1199,52 @@
|
|||
```
|
||||
* `id`:消息 ID
|
||||
|
||||
## 网络
|
||||
|
||||
### 正向代理
|
||||
|
||||
* `/api/network/forkProxy`
|
||||
* 参数
|
||||
|
||||
```json
|
||||
{
|
||||
"url": "https://b3log.org/siyuan/",
|
||||
"method": "GET",
|
||||
"timeout": 7000,
|
||||
"contentType": "text/html",
|
||||
"headers": [
|
||||
{
|
||||
"Cookie": ""
|
||||
}
|
||||
],
|
||||
"payload": {}
|
||||
}
|
||||
```
|
||||
|
||||
* `url`:转发的 URL
|
||||
* `method`:HTTP 方法,默认为 `GET`
|
||||
* `timeout`:超时时间,单位为毫秒,默认为 `7000` 毫秒
|
||||
* `contentType`:HTTP Content-Type,默认为 `application/json`
|
||||
* `headers`:HTTP 请求标头
|
||||
* `payload`:HTTP 请求体,对象或者是字符串
|
||||
* 返回值
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": {
|
||||
"body": "",
|
||||
"contentType": "text/html",
|
||||
"elapsed": 1976,
|
||||
"headers": {
|
||||
},
|
||||
"status": 200,
|
||||
"url": "https://b3log.org/siyuan"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 系统
|
||||
|
||||
### 获取启动进度
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue