次の方法で共有


interface IWebView2HttpRequestHeaders

Note

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

interface IWebView2HttpRequestHeaders
  : public IUnknown

HTTP request headers.

Summary

Members Descriptions
GetHeader Gets the header value matching the name.
Contains Checks whether the headers contain an entry matching the header name.
SetHeader Adds or updates header that matches the name.
RemoveHeader Removes header that matches the name.
GetIterator Gets an iterator over the collection of request headers.

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

GetHeader

Gets the header value matching the name.

public HRESULT GetHeader(LPCWSTR name,LPWSTR * value)

Contains

Checks whether the headers contain an entry matching the header name.

public HRESULT Contains(LPCWSTR name,BOOL * contains)

SetHeader

Adds or updates header that matches the name.

public HRESULT SetHeader(LPCWSTR name,LPCWSTR value)

RemoveHeader

Removes header that matches the name.

public HRESULT RemoveHeader(LPCWSTR name)

GetIterator

Gets an iterator over the collection of request headers.

public HRESULT GetIterator(IWebView2HttpHeadersCollectionIterator ** iterator)