cancelRequest

abstract fun cancelRequest(id: Long, @NonNull callback: ResultCallback)

Cancels a pending or running request (or download request). In case of success, the result of the HttpResponse in the requests callback will hold the error RequestCancelled

Parameters

id

Handle given by request() or download() methods.

callback

Callback to be called after attempt to cancel requests. Use this for error handling related to the id. It does not report if the request gets actually cancelled.