Expand description
传输层模块:HttpClient、重试策略、API 请求/响应、错误分类。
Modules§
- api_
request - API 请求构造模块。 构造 API 请求对象,将业务参数序列化为 JSON 字符串作为 biz_content。
- api_
response - API 响应解析模块。 解析 API 返回的 JSON 响应,code=0 时返回成功,否则返回错误。
- decode
- 公共 JSON 解码辅助函数。
- errors
- 错误码分类模块。 根据 API 错误码返回对应的错误分类。
- http_
client - HttpClient wraps HTTP requests, signing, retry, and timeout.
- retry
- 重试策略模块。 实现指数退避重试,交易操作跳过重试。