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

sushma nayak

03/23/2021, 10:30 AM
How to cancel requests in ktor client , multiplatform?
r

Ronald van D

03/23/2021, 12:12 PM
You can cancel the coroutine it’s fired from. Example:
Copy code
val job = Job()

        CoroutineScope(Dispatchers.Main + job).launch {
            httpClient.put<SomeModel>("<http://www.example.com>")
        }

job.cancel()
1
2 Views