Using a Web Browser to Test a Web Application
The browser you use to browse the web is actually a collection of different programs that interact with a user’s device. As a web browser, the program has a set of features to allow a user to navigate between different websites, read the content, and perform the tasks required for the user to interact with the website.
In that case, you would need to load the website with Selenium. The program has a builder (selenium_chrome.Builder), that allows you to specify different features of the browser (selenium_chrome.Options). Once you have the program loaded, you can use the navigator object to get the headers that are being returned by the website (page.executeScript).
You can access those headers by calling a function in your application. The function will return an object, that has the headers as a property (page.executeScript), along with other values, like status code and status line.