Closed clwater closed 4 months ago
That should be possible by just using a custom scope:
val myScope = CoroutineScope(Dispatchers.Default)
myScope.launch {
supabase.from("countries").select()
}
//somewhere else
myScope.cancel() //This will cancel the job. You will probably need to create a new scope afterward as the old one is cancelled
I'm curious, why do you want to cancel these requests?
@jan-tennert Thanks, I can use the Kotlin method to cancel my request.
My app has some scheduled sync requests, but If the user logs out, I want to cancel this sync request.
Yea, you can do that with a custom coroutine scope.
General info
What is your question?
How cancel supabase request?
Relevant log output (optional)