File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/http/impl Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,18 @@ internal class HttpClient(
184
184
}
185
185
}
186
186
187
+ if (headers?.rywToken != null ) {
188
+ con.setRequestProperty(" OneSignal-RYW-Token" , headers.rywToken.toString())
189
+ }
190
+
191
+ if (headers?.retryCount != null ) {
192
+ con.setRequestProperty(" Onesignal-Retry-Count" , headers.retryCount.toString())
193
+ }
194
+
195
+ if (headers?.sessionDuration != null ) {
196
+ con.setRequestProperty(" OneSignal-Session-Duration" , headers.sessionDuration.toString())
197
+ }
198
+
187
199
// Network request is made from getResponseCode()
188
200
httpResponse = con.responseCode
189
201
@@ -299,9 +311,9 @@ internal class HttpClient(
299
311
* Reads the HTTP Retry-Limit from the response.
300
312
*/
301
313
private fun retryLimitFromResponse (con : HttpURLConnection ): Int? {
302
- val retryLimitStr = con.getHeaderField(" Retry-Limit" )
314
+ val retryLimitStr = con.getHeaderField(" OneSignal- Retry-Limit" )
303
315
return if (retryLimitStr != null ) {
304
- Logging .debug(" HttpClient: Response Retry-After : $retryLimitStr " )
316
+ Logging .debug(" HttpClient: Response OneSignal- Retry-Limit : $retryLimitStr " )
305
317
retryLimitStr.toIntOrNull()
306
318
} else {
307
319
null
You can’t perform that action at this time.
0 commit comments