Table of Contents

Class CoreWebView2WebResourceRequestedEventArgs

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

Event args for the WebResourceRequested event.

public class CoreWebView2WebResourceRequestedEventArgs : EventArgs
Inheritance
CoreWebView2WebResourceRequestedEventArgs
Inherited Members

Properties

Request

Gets the web resource request.

public CoreWebView2WebResourceRequest Request { get; }

Property Value

CoreWebView2WebResourceRequest

Remarks

The request object may be missing some headers that are added by network stack at a later time.

RequestedSourceKind

Gets the source of web resource request.

public CoreWebView2WebResourceRequestSourceKinds RequestedSourceKind { get; }

Property Value

CoreWebView2WebResourceRequestSourceKinds

ResourceContext

Gets the web resource request context.

public CoreWebView2WebResourceContext ResourceContext { get; }

Property Value

CoreWebView2WebResourceContext

Response

Gets or sets the CoreWebView2WebResourceResponse object.

public CoreWebView2WebResourceResponse Response { get; set; }

Property Value

CoreWebView2WebResourceResponse

Remarks

If this object is set, the WebResourceRequested event will be completed with this Response. An empty CoreWebView2WebResourceResponse object can be created with CreateWebResourceResponse(Stream, int, string, string) and then modified to construct the Response.

Methods

GetDeferral()

Gets a CoreWebView2Deferral object and put the event into a deferred state.

public CoreWebView2Deferral GetDeferral()

Returns

CoreWebView2Deferral

Remarks

Use this to Complete() the event at a later time.