fix(kotlin-sdk): add missing /api prefix to flags, kill-switch, and telemetry routes

This commit is contained in:
saravanakumardb1 2026-03-02 09:15:03 -08:00
parent 78b942a105
commit 053190d660
3 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ class BLFeatureFlagClient(
append("?platform=${enc(config.platform)}")
userId?.let { append("&userId=${enc(it)}") }
}
val response = client.request("GET", "/flags/poll$qs", skipAuth = true)
val response = client.request("GET", "/api/flags/poll$qs", skipAuth = true)
val result = json.decodeFromString<FlagResponse>(response)
flags = result.flags
} catch (_: Exception) {

View File

@ -34,7 +34,7 @@ class BLKillSwitchClient(
suspend fun check(): KillSwitchResult {
return try {
val platform = URLEncoder.encode(config.platform, "UTF-8")
val response = client.request("GET", "/flags/kill-switch?platform=$platform", skipAuth = true)
val response = client.request("GET", "/api/flags/kill-switch?platform=$platform", skipAuth = true)
json.decodeFromString<KillSwitchResult>(response)
} catch (_: Exception) {
KillSwitchResult.ok()

View File

@ -187,7 +187,7 @@ class BLTelemetryClient(
scope.launch {
val body = json.encodeToString(EventBatch(batch))
client.fireAndForget(
"POST", "/telemetry/events", body,
"POST", "/api/telemetry/events", body,
extraHeaders = mapOf("X-Install-Token" to installId),
)
}