ICoreWebView2WebResourceResponse

Undocumented in source.

Members

Functions

get_Content
HRESULT get_Content(IStream** content)

HTTP response content as stream. 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. IStream semantics apply (return S_OK to Read runs until all data is exhausted). 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.

get_Headers
HRESULT get_Headers(ICoreWebView2HttpResponseHeaders* headers)

Overridden HTTP response headers.

get_ReasonPhrase
HRESULT get_ReasonPhrase(LPWSTR* reasonPhrase)

The HTTP response reason phrase.

get_StatusCode
HRESULT get_StatusCode(int* statusCode)

The HTTP response status code.

put_Content
HRESULT put_Content(IStream* content)

Sets the Content property.

put_ReasonPhrase
HRESULT put_ReasonPhrase(LPCWSTR reasonPhrase)

Sets the ReasonPhrase property.

put_StatusCode
HRESULT put_StatusCode(int statusCode)

Sets the StatusCode property.

Meta