Hello Everyone, I have response interceptor in my ...
# ktor
s
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?
p
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
@Prateek Kumar can you please guide me on method call chaining?
p
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
s
ok. Thanks