interface ICoreWebView2WebResourceRequest
Note
This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.
interface ICoreWebView2WebResourceRequest
: public IUnknown
An HTTP request used with the WebResourceRequested
event.
Members | Descriptions |
---|---|
get_Content | The HTTP request message body as stream. |
get_Headers | The mutable HTTP request headers. |
get_Method | The HTTP request method. |
get_Uri | The request URI. |
put_Content | Sets the Content property. |
put_Method | Sets the Method property. |
put_Uri | Sets the Uri property. |
Product | Introduced |
---|---|
WebView2 Win32 | 0.9.430 |
WebView2 Win32 Prerelease | 0.9.488 |
The HTTP request message body as stream.
public HRESULT get_Content(IStream ** content)
POST data should be here. If a stream is set, which overrides the message body, the 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 STA 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).
The mutable HTTP request headers.
public HRESULT get_Headers(ICoreWebView2HttpRequestHeaders ** headers)
The HTTP request method.
public HRESULT get_Method(LPWSTR * method)
The caller must free the returned string with CoTaskMemFree
. See API Conventions.
The request URI.
public HRESULT get_Uri(LPWSTR * uri)
The caller must free the returned string with CoTaskMemFree
. See API Conventions.
Sets the Content
property.
public HRESULT put_Content(IStream * content)
Sets the Method
property.
public HRESULT put_Method(LPCWSTR method)
Sets the Uri
property.
public HRESULT put_Uri(LPCWSTR uri)