fetchTwpHeartbeat
This content is not available in your language yet.
function fetchTwpHeartbeat( base, token, fetchImpl, sessionId?, clientFeatures?): Promise<TwpHeartbeatResult>;SDK 令牌档 heartbeat:POST /t1/heartbeat(令牌头鉴权),响应 features 数组即 TWP 能力串
(决定思考档位等可选能力是否出线);同一响应的 bundleEtag(bundle 失效订阅锚)顺手解析。
HTTP 失败 / 网络错 / 非 JSON 恒静默回双 undefined(fail-open 到现状,恒不阻装配、恒不炸会话)。
x-tansr-client-features 与 bundle 拉取同值出线——平台按该头计算 bundleEtag(分档形各异),
漏头即恒指缺省档 etag,与本 SDK 缓存的声明档 etag 恒不等 → 每次心跳重拉。
string
string
fetchImpl
Section titled “fetchImpl”any
sessionId?
Section titled “sessionId?”string
clientFeatures?
Section titled “clientFeatures?”readonly string[]
声明的客户端 features(缺省 CLIENT_FEATURES;与 bundle 拉取同携同值——平台 bundleEtag 按头分档)
Promise<TwpHeartbeatResult>
Was this page helpful?
Thanks for your feedback.