retrofit / retrofit2 / Call / cancel

cancel

abstract fun cancel(): Unit

Cancel this call. An attempt will be made to cancel in-flight calls, and if the call has not yet been executed it never will be.