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
3 changed files with 151 additions and 10 deletions

30
API.md
View File

@@ -1288,7 +1288,9 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
"Cookie": ""
}
],
"payload": {}
"payload": {},
"payloadEncoding": "text",
"responseEncoding": "text"
}
```
@@ -1298,6 +1300,22 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
* `contentType`: Content-Type, default is `application/json`
* `headers`: HTTP headers
* `payload`: HTTP payload, object or string
* `payloadEncoding`: The encoding scheme used by `pyaload`, default is `text`, optional values are as follows
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
* `responseEncoding`: The encoding scheme used by `body` in response data, default is `text`, optional values are as follows
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
* Return value
```json
@@ -1306,6 +1324,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
"msg": "",
"data": {
"body": "",
"bodyEncoding": "text",
"contentType": "text/html",
"elapsed": 1976,
"headers": {
@@ -1316,6 +1335,15 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
}
```
* `bodyEncoding`The encoding scheme used by `body`, is consistent with field `responseEncoding` in request, default is `text`, optional values are as follows
* `text`
* `base64` | `base64-std`
* `base64-url`
* `base32` | `base32-std`
* `base32-hex`
* `hex`
## System
### Get boot progress