Partager via


CoreWebView2Environment.CreateWebResourceResponse Method

Definition

Creates a new CoreWebView2WebResourceResponse object.

public System.Net.Http.HttpResponseMessage CreateWebResourceResponse (System.IO.Stream Content, int StatusCode, string ReasonPhrase, string Headers);
public Microsoft.Web.WebView2.Core.CoreWebView2WebResourceResponse CreateWebResourceResponse (System.IO.Stream Content, int StatusCode, string ReasonPhrase, string Headers);
member this.CreateWebResourceResponse : System.IO.Stream * int * string * string -> System.Net.Http.HttpResponseMessage
member this.CreateWebResourceResponse : System.IO.Stream * int * string * string -> Microsoft.Web.WebView2.Core.CoreWebView2WebResourceResponse
Public Function CreateWebResourceResponse (Content As Stream, StatusCode As Integer, ReasonPhrase As String, Headers As String) As HttpResponseMessage
Public Function CreateWebResourceResponse (Content As Stream, StatusCode As Integer, ReasonPhrase As String, Headers As String) As CoreWebView2WebResourceResponse

Parameters

Content
Stream

HTTP response content as stream.

StatusCode
Int32

The HTTP response status code.

ReasonPhrase
String

The HTTP response reason phrase.

Headers
String

The raw response header string delimited by newline.

Returns

Remarks

It is also possible to create this object with empty headers string and then use the CoreWebView2HttpResponseHeaders to construct the headers line by line.

Applies to

See also