Table of Contents

Class CoreWebView2WebResourceResponseView

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

View of the HTTP representation for a web resource response.

public class CoreWebView2WebResourceResponseView
Inheritance
CoreWebView2WebResourceResponseView
Inherited Members

Remarks

The properties of this object are not mutable. This response view is used with the WebResourceResponseReceived event.

Properties

Headers

Gets the HTTP response headers as received.

public CoreWebView2HttpResponseHeaders Headers { get; }

Property Value

CoreWebView2HttpResponseHeaders

ReasonPhrase

Gets the HTTP response reason phrase.

public string ReasonPhrase { get; }

Property Value

string

StatusCode

Gets the HTTP response status code.

public int StatusCode { get; }

Property Value

int

Methods

GetContentAsync()

Gets the response content stream asynchronously.

public Task<Stream> GetContentAsync()

Returns

Task<Stream>

Examples

Remarks

A null stream means no content was found. Note content (if any) for redirect responses is ignored. This method returns null if content size is more tha 123MB or for navigations that become downloads or if response is downloadable content type (e.g., application/octet-stream). See DownloadStarting event to handle the response. If this method is being called again before a first call has completed, it will complete at the same time all prior calls do. If this method is being called after a first call has completed, it will return immediately (asynchronously).

Exceptions

COMException

The content failed to load.