HTTP Client Deep Dive

Categories: HTTP Client, Java, HTTP, HTTP/2

JDK 11 saw the advent of a new HTTP Client and important new API for calling content on remote RESTful endpoints. This presentation will just focus on the HTTP Client are how to maximize its use.

We will cover

  • How to setup standard calls

  • How to work with proxies

  • How attach Flow API with either RXJava or Reactor to manipulate the results

  • How to process CompletableStages asynchronously

  • Processing HTTP/2

By the end of the presentation, you will have a complete understanding of the following code

HttpClient client = HttpClient.newHttpClient();

HttpRequest request =

CompletableFuture<HttpResponse<String>> future =

CompletableFuture<String> stringCompletableFuture = future
  .thenApplyAsync(m -> CountryFunctions.findLanguagesByRegion(m, "en", "Americas"));

  .orTimeout(15, TimeUnit.SECONDS)