ServiceWorkerClient.ShouldInterceptRequest(IWebResourceRequest) 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.
Notify the host application of a resource request and allow the application to return the data.
[Android.Runtime.Register("shouldInterceptRequest", "(Landroid/webkit/WebResourceRequest;)Landroid/webkit/WebResourceResponse;", "GetShouldInterceptRequest_Landroid_webkit_WebResourceRequest_Handler", ApiSince=24)]
public virtual Android.Webkit.WebResourceResponse? ShouldInterceptRequest (Android.Webkit.IWebResourceRequest? request);
[<Android.Runtime.Register("shouldInterceptRequest", "(Landroid/webkit/WebResourceRequest;)Landroid/webkit/WebResourceResponse;", "GetShouldInterceptRequest_Landroid_webkit_WebResourceRequest_Handler", ApiSince=24)>]
abstract member ShouldInterceptRequest : Android.Webkit.IWebResourceRequest -> Android.Webkit.WebResourceResponse
override this.ShouldInterceptRequest : Android.Webkit.IWebResourceRequest -> Android.Webkit.WebResourceResponse
Parameters
- request
- IWebResourceRequest
Object containing the details of the request.
Returns
A android.webkit.WebResourceResponse
containing the
response information or null
if the WebView should load the
resource itself.
- Attributes
Remarks
Notify the host application of a resource request and allow the application to return the data. If the return value is null
, the Service Worker will continue to load the resource as usual. Otherwise, the return response and data will be used.
<p class="note"><b>Note:</b> This method is called on a thread other than the UI thread so clients should exercise caution when accessing private data or the view system.
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.