'Python Selenium: Get headers from undetected_chromedriver

How I can get the request headers from webdriven in undetected_chromedriver.v2? The follow code not works with undetected_chromedriver:

driver.requests


Solution 1:[1]

Try setting CDP, then looking for network.requestWillBeSentExtraInfo - it's in the docs I think.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anon