https://kotlinlang.org logo
#ktor
Title
# ktor
e

Elka

10/12/2020, 1:47 PM
Hello, I am trying to build a multi-platform client that retries the request automatically when the token expired and 401 is returned from the server. For that I am using a sample code by moko-network. The refresh token api is being triggered but when it retries the request using
request
, I never get a
result
as if some "deadlock" occurred.
Copy code
val requestBuilder = HttpRequestBuilder().takeFrom(context.request)
val result: HttpResponse = context.client!!.request(requestBuilder)
Any idea?
👀 1
n

Nikita Khlebushkin

11/03/2020, 9:56 AM
Hello @Elka, have you found a solution?
n

Nikita Khlebushkin

11/03/2020, 9:59 AM
Thanks!
2 Views