How to Send HTTP Request and Parse JSON Data Using Java

  Рет қаралды 201,205

Coding Master - Programming Tutorials

Coding Master - Programming Tutorials

Күн бұрын

In this video, we're going to talk about how to send http request and parse response json data in java.
Time stamp:
1:52 - Old method for sending http request
10:33 - Send http request using new Java 11 API
18:26 - Parse json data
Here are the links to the official java doc
HttpURLConnection Documentation: docs.oracle.com/en/java/javas...
java.net.http Documentation: docs.oracle.com/en/java/javas...

Пікірлер: 142
@samuelluswata
@samuelluswata 4 жыл бұрын
This is the best explanation on KZfaq when it comes to the rest client. Thanks mate!!
@micahman33
@micahman33 4 жыл бұрын
Excellent reference. Especially appreciated the concept of showing 2 methods to accomplish the same thing. Thanks so much for putting this together. Keep building more tutorials. Subscribed!
@lowkeysynbad5479
@lowkeysynbad5479 3 жыл бұрын
This is a really high quality tutorial. I hope you keep making more of these in the future!
@bhaskarg
@bhaskarg 3 жыл бұрын
Great video on demonstrating the Api, I couldn’t find any references for this on the web. Simply the best. Thank you and appreciate it!
@Jandoisking
@Jandoisking 4 жыл бұрын
Thank you so much for this video. This has been by far the most helpful tutorial for someone who has no background in using APIs in java.
@25392633
@25392633 4 жыл бұрын
Muito obrigado pela explicação, a melhor até agora! Thank you from Brazil!
@mauricioquaranta7979
@mauricioquaranta7979 4 жыл бұрын
Excellent explanation, organization and clarity! (I just had a hard time seeing the small print! But I did it!). Congratulations! (I'm from Brazil)
@kiritomachida7305
@kiritomachida7305 3 жыл бұрын
This video is everything I've spent hours looking for, thank you.
@angelsmith2375
@angelsmith2375 6 ай бұрын
Thank you so much for this! This is the best tutorial I've seen thus far on youtube after all these years
@kuwertzel8938
@kuwertzel8938 3 жыл бұрын
Regarding the time stamps in the description: If you put 0:00 as your first time stamp (eg. "0:00 - Introduction") the video timeline will get sections according to the timestamps. It's a neat little thing!
@user-co7ne4xn8m
@user-co7ne4xn8m Жыл бұрын
You have a very understandable and simple English and cool explaining ability! Thank you!!!
@TheWhom
@TheWhom 3 жыл бұрын
Hello, i would to thank you so much for this simple tutorial. I've been looking for a few months in the internet for some tutorial like yours.
@shreyashsinha9389
@shreyashsinha9389 3 жыл бұрын
incredible tutorial... best tutorial on java api and parsing json calling on youtube
@tanishagrawal9091
@tanishagrawal9091 Жыл бұрын
You made everything crystal clear..Thanks for the help
@Art-ub1sg
@Art-ub1sg 4 жыл бұрын
Hey, dont stop. You make a great lessons!
@syfaiz
@syfaiz 4 жыл бұрын
Thank you, Sir, it works! I think this is one of many videos on the KZfaq--about parsing JSON with API--that works :D
@erengulbahar7915
@erengulbahar7915 2 жыл бұрын
This is very helpful video. I searched lots of video about like that but i couldn’t. That’s why thanks a lot.
@evanater13
@evanater13 2 жыл бұрын
the first method had me stuck and frustrated, I'm glad you included the second method. That worked. Seriously though, white background, and zoomed out so much that the text takes up maybe 1/3rd of the viewport... dark background, zoom in, word wrap.
@SAM15BFR
@SAM15BFR 4 жыл бұрын
Thank you so much, incredibly useful tutorial, really helped me out.
@BrandonLandrumJeffries
@BrandonLandrumJeffries 2 жыл бұрын
you are literally a hero for this. The only thing that I was finding online was with APOD...thank you :D
@diefastliveyoung
@diefastliveyoung 9 ай бұрын
Dude this is so amazingly helpful.
@ArtRoby
@ArtRoby 5 жыл бұрын
Thank you so much for this video . You clarified some thoughts that i had .
@bryandavidmendozamoreno1177
@bryandavidmendozamoreno1177 2 жыл бұрын
Excelente tutorial , gracias a ti acabo de aprender a consumir apis !
@erenjohn12345
@erenjohn12345 Жыл бұрын
Thank you so much for making this video!
@sagardekate04
@sagardekate04 3 жыл бұрын
Super clearly Explained! Wow! Keep it up!
@yt222ee
@yt222ee 4 жыл бұрын
Не знаю английский, но все понял. Крутой мужик, respect you!
@ByMyslf1
@ByMyslf1 4 жыл бұрын
Thank you very much for helping me out! Maybe you should make the font size a little bit bigger, but otherwise great explanation!
@rzozaya1969
@rzozaya1969 3 жыл бұрын
Thank you very much for this tutorial. I was searching for a way to do exactlythis in a simple way.
@robertmanigault625
@robertmanigault625 2 жыл бұрын
Excellent tutorial. Keep up the great work.
@RohanHazara
@RohanHazara 4 жыл бұрын
I like your explanation. great job!
@satmishra504
@satmishra504 4 жыл бұрын
Excellent explaination ,thank you !!
@lorence3290
@lorence3290 4 жыл бұрын
such a great video, thank you so much helped tremendously
@idrisseahamadiabdallah7669
@idrisseahamadiabdallah7669 3 жыл бұрын
Thank you very much for this tutorial, I learnt a lot.
@iuliiazadorozhnia5060
@iuliiazadorozhnia5060 4 жыл бұрын
Great tutorial! Thank you!
@kerimulusoy9615
@kerimulusoy9615 3 жыл бұрын
Than you very much man! Very helpful tutorial.
@padoization
@padoization 5 жыл бұрын
Thanks for the video man!
@WickedChild95
@WickedChild95 3 жыл бұрын
VERY good video, thank you so much!
@shubhambhopale4603
@shubhambhopale4603 2 жыл бұрын
Excellent! Thanks for this.
@angydust666
@angydust666 2 жыл бұрын
AMAZING!!!! THANKS very much fandango!!!!!
@milicanikolic4041
@milicanikolic4041 4 жыл бұрын
Thanks so much for the video!
@amba451
@amba451 2 жыл бұрын
thank you so much sir for this amazing explanation this helped me tremendously hope you have a beautiful day
@anitap6943
@anitap6943 3 жыл бұрын
Super helpful! Thank you
@RikoRiko-zi1dk
@RikoRiko-zi1dk 4 жыл бұрын
Thank you , Good explanation.
@Malgosiacie
@Malgosiacie 2 жыл бұрын
Incredibly helpful
@biswadeepchakraborty2254
@biswadeepchakraborty2254 2 жыл бұрын
Thanks for this awesome tutorial 👍
@isajamil4027
@isajamil4027 4 жыл бұрын
Very Useful. Thanks.
@ozdemirfatma
@ozdemirfatma 2 жыл бұрын
Thanks a lot for the excellent explanation
@suatkuran5323
@suatkuran5323 2 жыл бұрын
You are awesome!
@rishuyadav2395
@rishuyadav2395 4 жыл бұрын
made it look so easy!!
@Corqable
@Corqable 4 жыл бұрын
Awesome video!
@nadiiar75
@nadiiar75 Жыл бұрын
perfect/ thank you for such a great tutorial
@skarfie123
@skarfie123 4 жыл бұрын
larger text would be better, as others have said, but the explanation was very good
@tjie1
@tjie1 3 жыл бұрын
Very good tutorial!
@ryanmiguel496
@ryanmiguel496 3 жыл бұрын
Ok man, this video is wonderfull, tkx so much
@snowrida
@snowrida 4 жыл бұрын
Awesome tutorial
@huidrompunendrajitsingh1758
@huidrompunendrajitsingh1758 2 жыл бұрын
What a great video this helps me a lot. And it would be better if you increased the size of the font.
@sumanthreddy5308
@sumanthreddy5308 3 жыл бұрын
Helpfull Video!
@yashumaurya4500
@yashumaurya4500 3 жыл бұрын
Bro thanks a lot , u solved my problem
@itsgrves7396
@itsgrves7396 3 жыл бұрын
You are a lifesaver, thank you! Could you please show how to parse the data into an application and DB please! I am trying to get my parsed data into a TableView in a Javafx application
@Tony.Nguyen137
@Tony.Nguyen137 2 жыл бұрын
Thank you. 👍
@tanishagrawal9091
@tanishagrawal9091 Жыл бұрын
Keep making more videos
@sunnylucky5349
@sunnylucky5349 4 жыл бұрын
It is awesome thank you so much
@alexmelillo1247
@alexmelillo1247 3 жыл бұрын
Thanks a ton man!
@peterhogeveen6499
@peterhogeveen6499 3 жыл бұрын
So much thanks!
@dlandsvolka4046
@dlandsvolka4046 3 жыл бұрын
Thank you very very much
@billyochab3299
@billyochab3299 5 жыл бұрын
How would you be able to create a httprequest with different parameters that could be variables?
@iliasp4275
@iliasp4275 2 жыл бұрын
good video, thank you
@nicolahearn4294
@nicolahearn4294 Жыл бұрын
Brilliant video, thank you. What is the best way to use multiple endpoints of an API without using a library?
@mustafaazyoksul1372
@mustafaazyoksul1372 3 жыл бұрын
Hey. This video was useful to me. I also need to know how to send raw JSON object in the request body. Could you tell us how to do that?
@phamucmanh1750
@phamucmanh1750 3 жыл бұрын
Thank you so, bro
@retroprime7244
@retroprime7244 3 жыл бұрын
Thank you
@turtlepeak6130
@turtlepeak6130 4 жыл бұрын
Do we have to create a new connection everytime our program wants to send GET request?
@JuanRuiz-in1dg
@JuanRuiz-in1dg 4 жыл бұрын
Nice job folk
@Mikuwl
@Mikuwl 4 жыл бұрын
what if the value of an ID is an array/list? I thought something like int[] test = testarray.getInt("test") would work but I'm not having any luck
@realravijha
@realravijha 5 жыл бұрын
thank you
@noncanot
@noncanot 2 жыл бұрын
but how to you get a usable output from the lambda method? Like an object array or something that you could manipulate further
@Saiyan2003
@Saiyan2003 Жыл бұрын
Gracias muchas gracias >:,3
@nikhilagrawal9217
@nikhilagrawal9217 4 жыл бұрын
Thanks mate
@sachinborkar6259
@sachinborkar6259 3 жыл бұрын
Thanks
@GST-axelenandoh
@GST-axelenandoh Жыл бұрын
😍🔥
@sushiltiwari274
@sushiltiwari274 2 жыл бұрын
First method that you shown is showing json in single line can this be fixed to represent in actual json format
@gladiuscalosus4922
@gladiuscalosus4922 3 жыл бұрын
Hi what about if I want to send a json to the WebService ?
@camilocuervo8271
@camilocuervo8271 4 жыл бұрын
Ey man. How could I get an Object from other api, because alla the data in the api you use is Array.
@nivyanb
@nivyanb 2 жыл бұрын
Love u hogya
@nikhils.k7993
@nikhils.k7993 4 жыл бұрын
what plugins are you using?? and can anyone share the code!! would be really helpful if shared!!
@rohansachdeva1able
@rohansachdeva1able 2 жыл бұрын
how can I make it so that the parse method returns an array or array list of the data that I want? I see that currently there is a String return type. If we did return a string, where would that go? How do I receive that in the main program?
@MainakDev
@MainakDev Жыл бұрын
is there a way to do it without the org.json dependencies
@user-lv5nq7gs4d
@user-lv5nq7gs4d 2 жыл бұрын
лучшее объяснение!
@vishnukhare8981
@vishnukhare8981 2 жыл бұрын
hi where can I place my API key in the code
@yutaitadori7318
@yutaitadori7318 3 жыл бұрын
Hey how you remember all this code what all had to be done ?
@latahulli5720
@latahulli5720 3 жыл бұрын
How to call rest api using get method with query parameters
@israelchizungu396
@israelchizungu396 2 жыл бұрын
nice video. thanks. while using java 11 how to set the http method to GET, POST, or PATCH and still get response from server. if you've any link to a documentation, it'll be usefull. Thank you
@agirmani
@agirmani 4 жыл бұрын
How would you go about adding basic authentication to the second method?
@anujytube
@anujytube 3 жыл бұрын
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(url)) .setHeader("Authorization", "Basic c2VydmljsdfdsfsdfZfdsf3sdkJDNLc25fsadaes") .setHeader("Accept", "application/json") .build();
@hadihamdan1882
@hadihamdan1882 4 жыл бұрын
Do you use any plugins to use HTTPClient? I used Netbeans with jdk 12 but I can't use the http request of Java 11API
@xMarious98
@xMarious98 3 жыл бұрын
dk if you resolved, but it's a NetBeans problem. stackoverflow.com/questions/53251708/make-the-new-jdk-11-java-net-http-package-visible-in-netbeans-10
@ricardodeleon8302
@ricardodeleon8302 2 жыл бұрын
How Do I add request specification, token and type
@ismailkassim6325
@ismailkassim6325 3 жыл бұрын
How do I pass in the api key to http request?
@abhijayapaliwal
@abhijayapaliwal 3 жыл бұрын
In my json instead of [ it is starting with { so it is getting an error. How to solve it?
@yogeshkalalkar2262
@yogeshkalalkar2262 2 жыл бұрын
How we can send request with JAuth token
@vishnusivadas1441
@vishnusivadas1441 4 жыл бұрын
Can't see a thing, increase the font/video resolution please ! OR attach a link to the code !
@muhammadnurhafiznoormohama7605
@muhammadnurhafiznoormohama7605 4 жыл бұрын
pls attach the github link to the code i cant see the codes in the video
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
How To Call a REST API In Java - Simple Tutorial
29:14
Coding with John
Рет қаралды 265 М.
这是王子儿子吗
00:27
落魄的王子
Рет қаралды 20 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 10 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 40 МЛН
REST API concepts and examples
8:53
WebConcepts
Рет қаралды 6 МЛН
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 903 М.
Create your FIRST CRUD RESTful API - Java, MySQL, Springboot, JPA, & Maven
18:38
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 257 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,3 МЛН
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 1,3 МЛН
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1 МЛН
How to plan your Java learning path - Brain Bytes
16:46
Java Brains
Рет қаралды 652 М.
Parsing Json in Java Tutorial - Part 1: Jackson and Simple Objects
15:32
CoderFromScratch
Рет қаралды 119 М.
这是王子儿子吗
00:27
落魄的王子
Рет қаралды 20 МЛН