DEV Community

Cover image for Send an HTTP GET Request using Java 11 HttpClient
Dan Vega
Dan Vega

Posted on

Send an HTTP GET Request using Java 11 HttpClient

In this tutorial, you will learn how to make an HTTP request in Java using the HttpClient class from Java 11. This class makes it really easy to send a request and in this demo, you will learn how to call a REST API. The REST API is going to return a JSON array and you will then learn how to convert each item in the array into a Java Object using Jackson.

When you have completed this tutorial you should understand:
✅ What is the HttpClient class and why would you need it
✅ Use Java HttpClient to send an HTTP GET Request
✅ Call a REST Client in Java
✅ Use Jackson Databind to parse JSON into Java Objects
✅ Use a reference method to print out each Java Object

Top comments (1)

Collapse
 
nismooooooo profile image
Anton Dreka

Nice tutorial, thx.