The response headers exposed by this method correspond to the
most recent completed navigation for the specified browser instance.
Callers typically use this method to start an enumeration and then
call GetNextHeader repeatedly until it returns False to
indicate there are no more headers to enumerate.
Header names are case-insensitive by definition. This method
will usually return header names as lower-case values, but
applications should never depend on the casing and should compare
names case-insensitively. The header names and values are returned
exactly as enumerated internally by the WebView2 control.
Some response headers can appear multiple times in a message. For
list-valued headers (those defined by the HTTP specifications to be
comma-joinable), the implementation may return a single entry with a
comma-separated value (e.g., Accept-Language,
Cache-Control, etc.). Other headers must not be combined;
for example, each Set-Cookie header is returned as a
separate name/value pair and will be seen multiple times during
enumeration, each with a single cookie value. Code that depends on
specific headers should be prepared for either a single combined
value or multiple discrete occurrences of the same header name,
depending on the header's semantics.
Enumeration reflects a snapshot of the headers for that response.
Beginning a new navigation or calling ClearHeaders
invalidates the current enumeration. Only one header enumeration can
be active per browser instance at a time. This method cannot be called
while the browser is in the process of navigating to a new location.
It will also fail if the current document is a local file or if the
document text was set dynamically using the DocumentText
property. There are no response headers available in a local context.