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(
184184 }
185185 }
186186
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+
187199 // Network request is made from getResponseCode()
188200 httpResponse = con.responseCode
189201
@@ -299,9 +311,9 @@ internal class HttpClient(
299311 * Reads the HTTP Retry-Limit from the response.
300312 */
301313 private fun retryLimitFromResponse (con : HttpURLConnection ): Int? {
302- val retryLimitStr = con.getHeaderField(" Retry-Limit" )
314+ val retryLimitStr = con.getHeaderField(" OneSignal- Retry-Limit" )
303315 return if (retryLimitStr != null ) {
304- Logging .debug(" HttpClient: Response Retry-After : $retryLimitStr " )
316+ Logging .debug(" HttpClient: Response OneSignal- Retry-Limit : $retryLimitStr " )
305317 retryLimitStr.toIntOrNull()
306318 } else {
307319 null
You can’t perform that action at this time.
0 commit comments