Compartir a través de


interface ICoreWebView2HttpRequestHeaders

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
GetHeader Gets the header value matching the name.
GetHeaders Gets the header value matching the name via an iterator.
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)

GetHeaders

Gets the header value matching the name via an iterator.

public HRESULT GetHeaders(LPCWSTR name,ICoreWebView2HttpHeadersCollectionIterator ** iterator)

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(ICoreWebView2HttpHeadersCollectionIterator ** iterator)