Send HTTP GET Request using Java 11 HttpClient and parse JSON response into objects

preview_player
Показать описание
In this tutorial, you will learn how to make an HTTP request in Java using the HttpClient class from Java 11.

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

🔗Resources & Links mentioned in this video:

👋🏻Connect with me:

––––––––––––––––––––––––––––––
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

I almost thought it is impossible to learn http requests in java from the internet until i saw this video, thanx man. Great video by the way

nakuldighe
Автор

Dan, thank you so much for this tutorial!
I'm completely new to Java, and I feel that there are very few resources for learning these materials (compared to something like NodeJS or Python). It's greatly appreciated!

superiorautism
Автор

Nice! Lot's of API's out there with data returned in JSON format - this tutorial is exactly what I needed to get started! Learning about the .forEach was also a bit of a bonus. I think all I need to do is find this done asynchronously and I'm all set ...

raymondkosos
Автор

Thanks man. Great tutorial!

Simple and easy to understand. The best tutorial of http request in the internet.

rogeriosartori
Автор

You saved my life, thank you for this video i had about two days with this topic and it was so easy.

pablohernandez
Автор

I used to hate Java, but you just did make I love it.

Автор

Thank you!!..you made it simple and easy to understand.

shwetaadurkar
Автор

Its great! Thanks very much!!! Please do more....

QwinTube
Автор

This video helped me a lot in my learning phase. Thanks.

_kishorroy
Автор

Thank you very much. You helped me understand HttpClient Get() method.

batesinheritance
Автор

how to add password and username for authentication?

samehyoussef
Автор

excelente tutorial saludos desde argentina

Hector
Автор

Great toturial man thanks.

Could you please make a toturial for Post method ?
specially for this scenario :

- Post a Json object ( which include user and pass)
- get the value for token in response body.

amirbeheshtian
Автор

that was very easy to understand, would you kindly make a video in consuming rest services using authentications, and web tokens

edwinkipruto
Автор

Thanky ou this is exactly what i needed

abigailedwards
Автор

Thanks man. Great tutorial!

Have you ever thought about a new video about Spring boot + GraphQl or Spring boot + GraphQl + security?

I think it's a great topic for 2020.

andrii
Автор

Is it possible to map the response with body handler itself ?

praveens
Автор

Do you think adding application related functionality directly into a programming language somehow defeat incentive to learn the language itself?

pajeetsingh
Автор

This may be a dumb question, but what if you only need to access a few specific fields of your Json object? For instance if I was using a geocoding api and only needed to return the latitude and longitude. Thanks for the video extremely helpful!

michaelnewman
Автор

Is it possible to set multiple headers in our GET/POST method? In my program I need to set the authorization header (basicAuth), and I wonder if I can also set the content type.

laponiec