I tried to use this in a header interceptor as follows:
@Obfuscate
class HeaderInterceptor : Interceptor {
private val preferenceUtils = PreferenceUtils()
var API_KEY = "apikey"
override fun intercept(chain: Interceptor.Chain): Response {
var request = chain.request()
request = request.newBuilder().apply {
header("Content-Type", "application/json; charset=utf-8")
header(REQUEST_SOURCE, "Android")
header(HEADER_API_KEY, API_KEY)
header(LANG, preferenceUtils.language)
header(AUTHORIZATION, "$BEARER ${preferenceUtils.token}")
}
.build()
return chain.proceed(request)
}
}
I'm getting a compilation error (Could not initialize class io.michaelrocks.paranoid.grip.ClassesQueryBuilder). I'm using kotlin version 1.5 . Is this problem caused by kotlin version?
I tried to use this in a header interceptor as follows:
I'm getting a compilation error (Could not initialize class io.michaelrocks.paranoid.grip.ClassesQueryBuilder). I'm using kotlin version 1.5 . Is this problem caused by kotlin version?