Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.
interface ICoreWebView2HttpRequestHeaders
: public IUnknown
HTTP request headers.
Summary
Members | Descriptions |
---|---|
Contains | Checks whether the headers contain an entry matching the header name. |
GetHeader | Gets the header value matching the name. |
GetHeaders | Gets the header value matching the name via an iterator. |
GetIterator | Gets an iterator over the collection of request headers. |
RemoveHeader | Removes header that matches the name. |
SetHeader | Adds or updates header that matches the name. |
Used to inspect the HTTP request on WebResourceRequested event and NavigationStarting event. Note, you can modify the HTTP request headers from a WebResourceRequested event, but not from a NavigationStarting event.
Members
Contains
Checks whether the headers contain an entry matching the header name.
public HRESULT Contains(LPCWSTR name, BOOL * contains)
GetHeader
Gets the header value matching the name.
public HRESULT GetHeader(LPCWSTR name, LPWSTR * value)
GetHeaders
Gets the header value matching the name via an iterator.
public HRESULT GetHeaders(LPCWSTR name, ICoreWebView2HttpHeadersCollectionIterator ** iterator)
GetIterator
Gets an iterator over the collection of request headers.
public HRESULT GetIterator(ICoreWebView2HttpHeadersCollectionIterator ** iterator)
RemoveHeader
Removes header that matches the name.
public HRESULT RemoveHeader(LPCWSTR name)
SetHeader
Adds or updates header that matches the name.
public HRESULT SetHeader(LPCWSTR name, LPCWSTR value)