feat(token): 将token迁移至请求体并兼容旧版客户端

- C++客户端在请求payload中添加token字段
- .NET客户端在请求payload中添加token字段
- Rust客户端在请求payload中添加token字段
- SpringBoot2客户端移除buildTokenParameter调用,改为将token放入请求体
- SpringBoot3客户端移除buildTokenParameter调用,改为将token放入请求体
- SpringBoot2/3客户端新增getToken方法供内部调用
- 服务端增加兼容逻辑,优先从请求体获取token,为空时回退至URL query参数
This commit is contained in:
2026-09-13 21:07:56 +08:00
parent 70cb3e301e
commit af3cf2f6e6
8 changed files with 32 additions and 5 deletions
+2 -1
View File
@@ -136,7 +136,8 @@ public class Client
env = _config.Env,
version = _config.Version,
lastTime = _lastTime,
ignoreGlobal = _config.IgnoreGlobal
ignoreGlobal = _config.IgnoreGlobal,
token = _config.Token
};
var content = new StringContent(JsonConvert.SerializeObject(payload), System.Text.Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync(url, content);