interface IWebView2WebResourceRequest

Note

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

interface IWebView2WebResourceRequest
  : public IUnknown

An HTTP request used with the WebResourceRequested event.

Summary

Members Descriptions
get_Uri The request URI.
put_Uri Set the Uri property.
get_Method The HTTP request method.
put_Method Set the Method property.
get_Content The HTTP request message body as stream.
put_Content Set the Content property.
get_Headers The mutable HTTP request headers.

Members

get_Uri

The request URI.

public HRESULT get_Uri(LPWSTR * uri)

put_Uri

Set the Uri property.

public HRESULT put_Uri(LPCWSTR uri)

get_Method

The HTTP request method.

public HRESULT get_Method(LPWSTR * method)

put_Method

Set the Method property.

public HRESULT put_Method(LPCWSTR method)

get_Content

The HTTP request message body as stream.

public HRESULT get_Content(IStream ** content)

POST data would be here. If a stream is set, which will override the message body, the 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 STA 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

The mutable HTTP request headers.

public HRESULT get_Headers(IWebView2HttpRequestHeaders ** headers)