I'm trying to add AUTH Token to Retrofit I'm saving token on preferences Datastore but when I trying to retrieve it show null
Asked
Active
Viewed 1,060 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community May 10 '22 at 19:28
1 Answers
0
My code like this and its working.
private fun getHeaderInterceptor():Interceptor{
return Interceptor { chain ->
val request =
chain.request().newBuilder()
.header("Cookie", cookie!!)
.build()
chain.proceed(request)
}
}
Full code: https://gist.github.com/Cr3bain/adf61caaa9da3291e1739c9bf0f334d8

Crebain
- 180
- 1
- 8