响应报文格式
订阅 / 取消订阅应答为统一外壳 {id, code, msg}:成功时 code 为 200、msg 为 "success";失败时 code 为 400、msg 为机器可读的 token(如服务端在 warm-up 未就绪时拒绝订阅);入站消息被限流时 code 为 429、msg 为 "rate_limited"。id 回显你的请求 id(请求未带时省略)。
错误 msg token:bad_channel、not_ready、no_params、subscription_limit、not_owned、bad_request、unknown_method、rate_limited。
格式
{
"id": 1, //回调ID(回显)
"code": 200, //200 成功 / 400 请求错误 / 429 限流
"msg": "success" //"success" 或机器可读 token
}
Response-成功
{"id": 1, "code": 200, "msg": "success"}
Response-失败
{"id": 1, "code": 400, "msg": "bad_channel"}
Response-限流
{"code": 429, "msg": "rate_limited"}