diff --git a/pushnotifications/src/main/java/com/pusher/pushnotifications/reporting/api/ReportingAPI.kt b/pushnotifications/src/main/java/com/pusher/pushnotifications/reporting/api/ReportingAPI.kt index cf0a6655..da9038ec 100644 --- a/pushnotifications/src/main/java/com/pusher/pushnotifications/reporting/api/ReportingAPI.kt +++ b/pushnotifications/src/main/java/com/pusher/pushnotifications/reporting/api/ReportingAPI.kt @@ -17,11 +17,6 @@ class ReportingAPI(private val instanceId: String) { private val gson = Gson() - private val client = - OkHttpClient.Builder() - .addInterceptor(PusherLibraryHeaderInterceptor()) - .build() - private val service = Retrofit.Builder() .baseUrl(baseUrl) @@ -54,4 +49,12 @@ class ReportingAPI(private val instanceId: String) { reportingRequest = reportEvent ).enqueue(callback) } + + + companion object { + val client: OkHttpClient = + OkHttpClient.Builder() + .addInterceptor(PusherLibraryHeaderInterceptor()) + .build() + } }