'How to send HTTP header for every request in Eclipse SWT Browser?

I want to load a web page in the Eclipse SWT browser (org.eclipse.swt.browser.Browser) and send an HTTP Authorization Header for every request.

I have tried using the public boolean setUrl​(String url, String postData, String[] headers) method. However, this only sends it on the first request (the one I make directly) and it's missing on all the subsequent requests that the page makes by itself (via Ajax).

Is there any way to achieve this?



Sources

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

Source: Stack Overflow

Solution Source