The goal of this enhancement is to use new [HttpClient APIs](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html) available from JDK 11.
Reference: [1] https://openjdk.java.net/groups/net/httpclient/intro.html [2] https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html Though this uses JDK 11 HttpClient APIs, it needs latest JDK 12 to work correctly due to the dependency on following issues, [JDK-8218546](https://bugs.openjdk.java.net/browse/JDK-8218546) Unable to connect to https://google.com using java.net.HttpClient [JDK-8218662](https://bugs.openjdk.java.net/browse/JDK-8218662) Allow 204 responses with Content-Length:0 [JDK-8203850](https://bugs.openjdk.java.net/browse/JDK-8203850) java.net.http HTTP client should allow specifying Origin and Referer headers #### Task List - [x] simple GET requests - [x] Runtime setting to fallback to legacy client - [ ] Runtime settings to use *only* HTTP/1.1 - [x] sync requests - [x] Error Handling & Propagation - [x] POST with form data - [x] AccessController association for HttpClient.sendAsync / send - [x] Redirection - [ ] Check for possibilities to write unit tests - [ ] Sync request handling from WebCore java platform layer - [x] Make use of singleton instance of direct ByteBuffer instead of using allocator pool - [x] gzip, deflate encoding support #### HTTP/2 Test pages - http://www.http2demo.io - https://http2.akamai.com/demo - https://http2.golang.org - https://google.com #### Redirection Test - https://www.httpwatch.com/httpgallery/redirection/#showExample7 More details are available at https://github.com/javafxports/openjdk-jfx/pull/247. ---------------- Commits: - 1798a661: 8211308: Support HTTP/2 in WebView Changes: https://git.openjdk.java.net/jfx/pull/14/files Webrev: https://webrevs.openjdk.java.net/jfx/14/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JDK-8211308 Stats: 1161 lines in 14 files changed: 876 ins; 217 del; 68 mod Patch: https://git.openjdk.java.net/jfx/pull/14.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/14/head:pull/14 PR: https://git.openjdk.java.net/jfx/pull/14