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

Ali Albaali

10/16/2020, 8:04 PM
Hi guys, Is there a way to rerun the request when intercepting the response pipeline? I'm trying to implement a Refresh Token Feature but I can't figure a way to rerun the request with the new token.
r

rsetkus

10/17/2020, 9:08 PM
Copy code
val requestBuilder = HttpRequestBuilder().takeFrom(context.request)
val result: HttpResponse = context.client!!.request(requestBuilder)
proceedWith(result)
Code snippet from the library the library -> https://github.com/icerockdev/moko-network
3 Views