hollingsworthd / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
812 stars 143 forks source link

HTTP/2 support #275

Open shuvozula opened 7 years ago

shuvozula commented 7 years ago

Does jBrowserDriver provide HTTP/2 support? I'm trying to test Nginx's Http/2 support and using jBrowserDriver to test. Unfortunately, in the Nginx logs, all requests are arriving over HTTP/1.1, not HTTP/2 as expected.

Pasted below is how I'm using it to make requests:

        JBrowserDriver driver = new JBrowserDriver(Settings.builder()
                .headless(true)
                .loggerLevel(Level.OFF)
                .ssl("trustanything")
                .build());
        driver.get(url);
        driver.quit();

where, url is something like https://nginx-http2-url/

Thanks in advance!

hollingsworthd commented 7 years ago

Not yet. At some point Apache HttpComponents, a dependency of this project, will be upgraded and HTTP/2 support will come along with that. I think HttpComponents has some breaking API changes in that upgrade.

shuvozula commented 7 years ago

Cool thanks! I ended up using headless-firefox, but its an additional moving part, would much rather prefer the embedded option like how JBrowserDriver provides. Hopefully Httpcomponents upgrades their client to use HTTP/2 soon.

Additionally, I was going to suggest using OkHttp3 instead of HttpComponents, as it already provides HTTP/2 support