UrlRequest.Cancel Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cancels the request.
[Android.Runtime.Register("cancel", "()V", "GetCancelHandler", ApiSince=34)]
public abstract void Cancel ();
[<Android.Runtime.Register("cancel", "()V", "GetCancelHandler", ApiSince=34)>]
abstract member Cancel : unit -> unit
- Attributes
Remarks
Cancels the request. Can be called at any time. Callback#onCanceled onCanceled()
will be invoked when cancellation is complete and no further callback methods will be invoked. If the request has completed or has not started, calling cancel()
has no effect and onCanceled()
will not be invoked. If the Executor
passed in during UrlRequest
construction runs tasks on a single thread, and cancel()
is called on that thread, no callback methods (besides onCanceled()
) will be invoked after cancel()
is called. Otherwise, at most one callback method may be invoked after cancel()
has completed.
Java documentation for android.net.http.UrlRequest.cancel()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.