MicrosoftEdge / MicrosoftEdge/WebView2Feedback
DevToolsProtocolExtension's Network.Headers type is wrongly defined
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
The Headers class defined under Microsoft.Web.WebView2.Core.DevToolsProtocolExtension namespace's Network class is defined as an empty class with no properties or methods. This makes it impossible to retrieve the actual header data after retrieving data about a request or response.
This is the definition of a Response class, for example:

Here you can see that Headers class has no methods or properties whatsoever, making it impossible to retrieve data from it:

From the Chrome Devtools' GitHub page documentation:
Network.Headers - Request / response headers as keys / values of JSON object. Type: object
You can see that the headers property indeed is an object containing key-value pairs of headers (Taken from protocol monitor):

I'm assuming this happened because the types are auto-generated from some other source - perhaps the header property should instead be defined as something like Dictionary<string, string> or some sort of collection containing key-value pairs?
If the types are auto-generated, it also might be worth it to verify other auto-generated types to see if any of it also has no properties / methods?
Version
SDK: 1.0.1150.38
DevToolsProtocolExtension: 1.0.824
Framework: WPF
(Leaving out the rest since they are unrelated)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Microsoft.Web.WebView2.Core.DevToolsProtocolExtension.Network.Headers definition and compare it with the Chrome DevTools Protocol Network.Headers documentation linked in the issue. Trace how it is exposed through request and response data; done means callers can retrieve header names and values rather than receiving an empty type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, desktop, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100