WebViewClient.OnReceivedHttpError Method

Definition

Notify the host application that an HTTP error has been received from the server while loading a resource.

[Android.Runtime.Register("onReceivedHttpError", "(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;Landroid/webkit/WebResourceResponse;)V", "GetOnReceivedHttpError_Landroid_webkit_WebView_Landroid_webkit_WebResourceRequest_Landroid_webkit_WebResourceResponse_Handler", ApiSince=23)]
public virtual void OnReceivedHttpError (Android.Webkit.WebView? view, Android.Webkit.IWebResourceRequest? request, Android.Webkit.WebResourceResponse? errorResponse);
[<Android.Runtime.Register("onReceivedHttpError", "(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;Landroid/webkit/WebResourceResponse;)V", "GetOnReceivedHttpError_Landroid_webkit_WebView_Landroid_webkit_WebResourceRequest_Landroid_webkit_WebResourceResponse_Handler", ApiSince=23)>]
abstract member OnReceivedHttpError : Android.Webkit.WebView * Android.Webkit.IWebResourceRequest * Android.Webkit.WebResourceResponse -> unit
override this.OnReceivedHttpError : Android.Webkit.WebView * Android.Webkit.IWebResourceRequest * Android.Webkit.WebResourceResponse -> unit

Parameters

view
WebView

The WebView that is initiating the callback.

request
IWebResourceRequest

The originating request.

errorResponse
WebResourceResponse

Information about the error occurred.

Attributes

Remarks

Notify the host application that an HTTP error has been received from the server while loading a resource. HTTP errors have status codes &gt;= 400. This callback will be called for any resource (iframe, image, etc.), not just for the main page. Thus, it is recommended to perform minimum required work in this callback. Note that the content of the server response may not be provided within the errorResponse parameter.

Java documentation for android.webkit.WebViewClient.onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponse).

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