devxlogo

September 9, 2019

Trigger a GET Request via the JDK 11 HttpClient API

The JDK 11 HttpClient API is very flexible and intuitive. Here it is a sample of triggering a GET request and printing the response: HttpClient client = HttpClient.newHttpClient();HttpRequest request =