次の方法で共有


interface ICoreWebView2WebResourceResponse

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

interface ICoreWebView2WebResourceResponse
  : public IUnknown

An HTTP response used with the WebResourceRequested event.

Summary

Members Descriptions
get_Content HTTP response content as stream.
put_Content Set the Content property.
get_Headers Overridden HTTP response headers.
get_StatusCode The HTTP response status code.
put_StatusCode Set the StatusCode property.
get_ReasonPhrase The HTTP response reason phrase.
put_ReasonPhrase Set the ReasonPhrase property.

Members

get_Content

HTTP response content as stream.

public HRESULT get_Content(IStream ** content)

Stream must have all the content data available by the time this response's WebResourceRequested event deferral 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 calls until all data is exhausted)

put_Content

Set the Content property.

public HRESULT put_Content(IStream * content)

get_Headers

Overridden HTTP response headers.

public HRESULT get_Headers(ICoreWebView2HttpResponseHeaders ** headers)

get_StatusCode

The HTTP response status code.

public HRESULT get_StatusCode(int * statusCode)

put_StatusCode

Set the StatusCode property.

public HRESULT put_StatusCode(int statusCode)

get_ReasonPhrase

The HTTP response reason phrase.

public HRESULT get_ReasonPhrase(LPWSTR * reasonPhrase)

put_ReasonPhrase

Set the ReasonPhrase property.

public HRESULT put_ReasonPhrase(LPCWSTR reasonPhrase)