Class CoreWebView2HttpRequestHeaders
HTTP request headers.
public class CoreWebView2HttpRequestHeaders : IEnumerable<KeyValuePair<string, string>>, IEnumerable
  - Inheritance
 - 
      
      CoreWebView2HttpRequestHeaders
 
- Implements
 
- Inherited Members
 
Remarks
Used to inspect the HTTP request on WebResourceRequested event and NavigationStarting event. It is possible to modify the HTTP request headers from a WebResourceRequested event, but not from a NavigationStarting event.
Methods
Contains(string)
Checks whether the headers contain an entry that matches the header name.
public bool Contains(string name)
  Parameters
namestring
Returns
- bool
 Whether the headers contain an entry that matches the header name.
- See Also
 
GetEnumerator()
Returns an enumerator that iterates through the CoreWebView2HttpRequestHeaders or CoreWebView2HttpResponseHeaders collection.
public CoreWebView2HttpHeadersCollectionIterator GetEnumerator()
  Returns
- See Also
 
GetHeader(string)
Gets the header value matching the name.
public string GetHeader(string name)
  Parameters
namestring
Returns
- string
 The header value matching the name.
- See Also
 
GetHeaders(string)
Gets the header value matching the name using a CoreWebView2HttpHeadersCollectionIterator.
public CoreWebView2HttpHeadersCollectionIterator GetHeaders(string name)
  Parameters
namestring
Returns
- CoreWebView2HttpHeadersCollectionIterator
 The header value matching the name.
- See Also
 
GetIterator()
Gets a CoreWebView2HttpHeadersCollectionIterator over the collection of request headers.
public CoreWebView2HttpHeadersCollectionIterator GetIterator()
  Returns
- See Also
 
RemoveHeader(string)
Removes header that matches the name.
public void RemoveHeader(string name)
  Parameters
namestring
- See Also
 
SetHeader(string, string)
Adds or updates header that matches the name.
public void SetHeader(string name, string value)
  Parameters
- See Also