Partager via


CoreWebView2HttpRequestHeaders Class

Implements: IIterable<IKeyValuePair<string, string>>

HTTP request headers. Used to inspect the HTTP request on CoreWebView2.WebResourceRequested event and CoreWebView2.NavigationStarting event. It is possible to modify the HTTP request headers from a CoreWebView2.WebResourceRequested event, but not from a CoreWebView2.NavigationStarting event.

Summary

Members Description
Contains Checks whether the headers contain an entry that matches the header name.
First
GetHeader Gets the header value matching the name.
GetHeaders Gets the header value matching the name using a CoreWebView2HttpHeadersCollectionIterator.
RemoveHeader Removes header that matches the name.
SetHeader Adds or updates header that matches the name.

Methods

Contains

bool Contains(string name)

Checks whether the headers contain an entry that matches the header name.

First

IIterator<IKeyValuePair<string, string>> First()

GetHeader

string GetHeader(string name)

Gets the header value matching the name.

GetHeaders

CoreWebView2HttpHeadersCollectionIterator GetHeaders(string name)

Gets the header value matching the name using a CoreWebView2HttpHeadersCollectionIterator.

RemoveHeader

void RemoveHeader(string name)

Removes header that matches the name.

SetHeader

void SetHeader(string name, string value)

Adds or updates header that matches the name.

Referenced by