How to cancel requests in ktor client , multiplatf...
# ktor
s
How to cancel requests in ktor client , multiplatform?
r
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