@@ -3,6 +3,7 @@ package com.onesignal.core.internal.http
3
3
import com.onesignal.common.OneSignalUtils
4
4
import com.onesignal.core.internal.device.impl.InstallIdService
5
5
import com.onesignal.core.internal.http.impl.HttpClient
6
+ import com.onesignal.core.internal.http.impl.OptionalHeaderValues
6
7
import com.onesignal.core.internal.time.impl.Time
7
8
import com.onesignal.debug.LogLevel
8
9
import com.onesignal.debug.internal.logging.Logging
@@ -88,9 +89,11 @@ class HttpClientTests : FunSpec({
88
89
val httpClient = mocks.httpClient
89
90
90
91
// When
91
- val response1 = httpClient.get("URL ", "CACHE_KEY ")
92
+ val headerValues = OptionalHeaderValues ()
93
+ headerValues.cacheKey = " CACHE_KEY"
94
+ val response1 = httpClient.get("URL ", headerValues)
92
95
factory.mockResponse = mockResponse2
93
- val response2 = httpClient.get("URL ", " CACHE_KEY " )
96
+ val response2 = httpClient.get("URL ", headerValues )
94
97
95
98
// Then
96
99
response1.statusCode shouldBe 200
@@ -123,13 +126,15 @@ class HttpClientTests : FunSpec({
123
126
val httpClient = mocks.httpClient
124
127
125
128
// When
126
- val response1 = httpClient.get("URL ", "CACHE_KEY ")
129
+ val headerValues = OptionalHeaderValues ()
130
+ headerValues.cacheKey = " CACHE_KEY"
131
+ val response1 = httpClient.get("URL ", headerValues)
127
132
128
133
factory.mockResponse = mockResponse2
129
- val response2 = httpClient.get("URL ", " CACHE_KEY " )
134
+ val response2 = httpClient.get("URL ", headerValues )
130
135
131
136
factory.mockResponse = mockResponse3
132
- val response3 = httpClient.get("URL ", " CACHE_KEY " )
137
+ val response3 = httpClient.get("URL ", headerValues )
133
138
134
139
// Then
135
140
response1.statusCode shouldBe 200
0 commit comments