Initiator.RequestId is always empty in Network.RequestWillBeSent #4766
Unanswered
DevCyber23
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You'll need to disable CEFs network interceptor to get the devtools network events to work properly.
You'll need to discuss that with the CEF maintainer https://github.com/chromiumembedded/cef
Again you'll need to discuss with the CEF maintainer. If CEF adds support then it can be exposed as part of the cefsharp API (cefsharp is one of many wrappers). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to use the DevTools to get a unique identifier of the initiator request, so that when I intercept a request I can tie it back to its parent request. I use Network.RequestWillBeSent to trap GET requests. This callback receives (in the "args" parameter) an Initiator object which should contain a RequestId and a Url, among other things. However, in all my tests I have never once seen the RequestId field populated, it's always empty (while fields like the Url, the Headers and the Stack are correctly set in many cases).
Is there a specific configuration that I need to enable to populate this Initiator.RequestId field? If not, can you please populate the RequestId with the appropriate identifier of the Initiator? In order to be useful, args.Initiator.RequestId should be the same as args.RequestId so that it is possible to correlate and identify the Initiator to previously seen requests. (Example: I intercept a request, it has RequestId 23. Then I receive a second request, it has RequestId 24, and Initiator.RequestId set to 23, so I know that 23 is the parent of 24).
By any chance, can these information be made available in GetResourceRequestHandler (from CefSharp.Handler.RequestHandler)? I have a similar problem there, where the callback receives an IRequest with a usually valid RequestId, and it also receives an Initiator string that is empty or just the main Url. (Just to be clear, I would like the initiator to be the same as reported in the Network tab in the browser's developer tools GUI.)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions