Freigeben über


CoreWebView2WebResourceResponse.Content Property

Definition

Gets HTTP response content as stream.

public System.IO.Stream Content { get; set; }
member this.Content : System.IO.Stream with get, set
Public Property Content As Stream

Property Value

Remarks

Stream must have all the content data available by the time the WebResourceRequested event deferral of this response is completed. Stream should be agile or be created from a background thread to prevent performance impact to the UI thread. null means no content data.

When providing the response data, you should consider relevant HTTP request headers just like an HTTP server would do. For example, if the request was for a video resource in a HTML video element, the request may contain the Range header to request only a part of the video that is streaming. In this case, your response stream should be only the portion of the video specified by the range HTTP request headers and you should set the appropriate Content-Range header in the response.

Applies to

See also