다음을 통해 공유


UrlRequest.ICallback.OnFailed Method

Definition

Invoked if request failed for any reason after UrlRequest#start.

[Android.Runtime.Register("onFailed", "(Landroid/net/http/UrlRequest;Landroid/net/http/UrlResponseInfo;Landroid/net/http/HttpException;)V", "GetOnFailed_Landroid_net_http_UrlRequest_Landroid_net_http_UrlResponseInfo_Landroid_net_http_HttpException_Handler:Android.Net.Http.UrlRequest/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public void OnFailed (Android.Net.Http.UrlRequest request, Android.Net.Http.UrlResponseInfo? info, Android.Net.Http.HttpException error);
[<Android.Runtime.Register("onFailed", "(Landroid/net/http/UrlRequest;Landroid/net/http/UrlResponseInfo;Landroid/net/http/HttpException;)V", "GetOnFailed_Landroid_net_http_UrlRequest_Landroid_net_http_UrlResponseInfo_Landroid_net_http_HttpException_Handler:Android.Net.Http.UrlRequest/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member OnFailed : Android.Net.Http.UrlRequest * Android.Net.Http.UrlResponseInfo * Android.Net.Http.HttpException -> unit

Parameters

request
UrlRequest

Request that failed. <strong>This is not guaranteed to be the same object as the one received by other callbacks, nor is it guaranteed to be the one returned by URLRequest.Builder#build.</strong> However, method calls on this object will have the same effects as calls on the original URLRequest.

info
UrlResponseInfo

Response information. May be null if no response was received.

error
HttpException

information about error.

Attributes

Remarks

Invoked if request failed for any reason after UrlRequest#start. Once invoked, no other Callback methods will be invoked. error provides information about the failure.

Java documentation for android.net.http.UrlRequest.Callback.onFailed(android.net.http.UrlRequest, android.net.http.UrlResponseInfo, android.net.http.HttpException).

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.

Applies to