Hello Everyone,
I have response interceptor in my library and I want to handle 401 code issue and after refreshing the token, I want to call the previous api where it failed. Can anyone please guide on this?
For my case it was not enough as i had a diff kind of flow for refresh token, So i just did it outside Ktor using simple method call chaining
s
Sahil0shrma
05/14/2024, 4:26 AM
@Prateek Kumar can you please guide me on method call chaining?
p
Prateek Kumar
05/14/2024, 5:15 AM
Normal chaining, making a normal method call which will do original call, check the response for 401 or any other code, and based on that u can choose to return the result or make refresh token call