fix(kotlin-sdk): add platform query parameter to kill-switch URL
BLKillSwitchClient was missing the platform query parameter that BLFeatureFlagClient already sends. This caused the test 'sends correct query parameters' to fail.
This commit is contained in:
parent
6ba86e0bf4
commit
c3f81cc97a
@ -33,8 +33,8 @@ class BLKillSwitchClient(
|
||||
*/
|
||||
suspend fun check(): KillSwitchResult {
|
||||
return try {
|
||||
val productId = URLEncoder.encode(config.productId, "UTF-8")
|
||||
val response = client.request("GET", "/api/settings/kill-switch?productId=$productId", skipAuth = true)
|
||||
val enc = { v: String -> URLEncoder.encode(v, "UTF-8") }
|
||||
val response = client.request("GET", "/api/settings/kill-switch?productId=${enc(config.productId)}&platform=${enc(config.platform)}", skipAuth = true)
|
||||
json.decodeFromString<KillSwitchResult>(response)
|
||||
} catch (_: Exception) {
|
||||
KillSwitchResult.ok()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user