feat: sync httpdns sdk/platform updates without large binaries
This commit is contained in:
13
HttpDNSSDK/spec/error-codes.md
Normal file
13
HttpDNSSDK/spec/error-codes.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# 错误码规范
|
||||
|
||||
## 基础错误码
|
||||
- `SUCCESS`: 成功
|
||||
- `NO_RECORDS`: 无解析记录
|
||||
- `SIGN_INVALID`: 签名错误
|
||||
- `APP_NOT_FOUND`: 应用不存在
|
||||
- `INTERNAL_ERROR`: 服务内部错误
|
||||
|
||||
## 客户端处理建议
|
||||
- `NO_RECORDS`: 触发本地 DNS 或业务降级
|
||||
- `SIGN_INVALID`: 检查 appId/secret 与时钟
|
||||
- `INTERNAL_ERROR`: 重试 + 回退
|
||||
17
HttpDNSSDK/spec/resolve-api.md
Normal file
17
HttpDNSSDK/spec/resolve-api.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Resolve API 规范
|
||||
|
||||
## 目标
|
||||
- 统一 Android / iOS / Flutter 对 `/resolve` 的请求与响应语义。
|
||||
|
||||
## 请求参数
|
||||
- `appId`: 应用标识
|
||||
- `dn`: 待解析域名
|
||||
- `qtype`: `A` 或 `AAAA`
|
||||
- `sdk_version`: SDK 版本号
|
||||
- `os`: 平台标识(android/ios/flutter)
|
||||
- `sid`: 会话标识
|
||||
|
||||
## 响应语义
|
||||
- `code=SUCCESS` 且 `records` 非空:返回可用 IP 列表
|
||||
- `code=SUCCESS` 且 `records` 为空:视为无解析记录
|
||||
- 非 `SUCCESS`:按错误码处理降级
|
||||
Reference in New Issue
Block a user