feat(api): improve /api/network/forwardProxy (#9110)

This commit is contained in:
Yingyi / 颖逸 2023-09-05 08:51:57 +08:00 committed by GitHub
parent 49c648f9be
commit d99ac84092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 151 additions and 10 deletions

View file

@ -1278,7 +1278,9 @@
"Cookie": ""
}
],
"payload": {}
"payload": {},
"payloadEncoding": "text",
"responseEncoding": "text"
}
```
@ -1288,6 +1290,22 @@
* `contentType`HTTP Content-Type默认为 `application/json`
* `headers`HTTP 请求标头
* `payload`HTTP 请求体,对象或者是字符串
* `payloadEncoding``pyaload` 所使用的编码方案,默认为 `text`,可选值如下所示
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
* `responseEncoding`:响应数据中 `body` 字段所使用的编码方案,默认为 `text`,可选值如下所示
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
* 返回值
```json
@ -1296,6 +1314,7 @@
"msg": "",
"data": {
"body": "",
"bodyEncoding": "text",
"contentType": "text/html",
"elapsed": 1976,
"headers": {
@ -1306,6 +1325,15 @@
}
```
* `bodyEncoding``body` 所使用的编码方案,与请求中 `responseEncoding` 字段一致,默认为 `text`,可能的值如下所示
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
## 系统
### 获取启动进度