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
@DanVega4 жыл бұрын
Wow, that is so awesome of you to say. Thank you for watching.
@raymondkosos3 жыл бұрын
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 ...
@DanVega3 жыл бұрын
Glad it helped!
@pablohernandez43053 жыл бұрын
You saved my life, thank you for this video i had about two days with this topic and it was so easy.
@rogeriosartori56444 жыл бұрын
Thanks man. Great tutorial! Simple and easy to understand. The best tutorial of http request in the internet.
4 жыл бұрын
I used to hate Java, but you just did make I love it.
@nurba_nurba4 жыл бұрын
video starts from 6:03. thank me later
@shwetaadurkar5622 жыл бұрын
Thank you!!..you made it simple and easy to understand.
@DanVega2 жыл бұрын
Glad it helped!
@praveens2272 Жыл бұрын
Is it possible to map the response with body handler itself ?
@laponiec2 жыл бұрын
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.
@ArmanhannaniАй бұрын
How can I return only one part of json string ?
@QwinTube3 жыл бұрын
Its great! Thanks very much!!! Please do more....
@kostiantynkarzhanov92169 ай бұрын
Great tutorial! Thank you so much! 💛
@mcbondgh10 күн бұрын
Clean and clear Sir
@samehyoussef49883 жыл бұрын
how to add password and username for authentication?
@pajeetsingh2 жыл бұрын
Do you think adding application related functionality directly into a programming language somehow defeat incentive to learn the language itself?
@DanVega2 жыл бұрын
Not at all. Having to write low level code to interact with Http doesn't sound like fun to me. Program languages give us the ability to perform common tasks and I think this is a great abstraction here.
@devinbaack35783 жыл бұрын
How would this work for nested Json?
@_kishorroy2 жыл бұрын
This video helped me a lot in my learning phase. Thanks.
@alpanajyoti77743 жыл бұрын
How one can use interceptor to maintain session cookies for okHttpclient with core Java?
@batesinheritance2 жыл бұрын
Thank you very much. You helped me understand HttpClient Get() method.
@7thwik3 жыл бұрын
Can someone explain on how to unit test these requests, responses using mockito ?
@grrlgd38353 жыл бұрын
Tks Dan , very useful. how about to get an image ?
@zorfrak3 жыл бұрын
I'm able to retrieve the data from the API, but but I get IllegalStateException("Cipher not initialized"). Can I prevent this?
@cypherliquid Жыл бұрын
what if we want to send a jwt token.
@vanshrana95082 жыл бұрын
It was very helpful, thanks a lot :)
@DanVega2 жыл бұрын
You're welcome!
@michaelnewman29933 жыл бұрын
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!
@conradpeterson13873 жыл бұрын
You've probably already figured this out, but you can just add the annotation "@JsonIgnoreProperties(ignoreUnknown=true)" to the object class and then you only have to include variables in the class for the specific fields you want.
@wiliamferraciolli53803 жыл бұрын
Can you show us how to unit test it please? with mockito
@nidhishah97013 жыл бұрын
how can we achieve this with localhost?
@kriszteblade Жыл бұрын
Perfect tutorial.
@iVarLitap4 жыл бұрын
If i want to consume this web service then how can get object reference of Post class
@ArunKumar-oi1yu2 жыл бұрын
I am getting exception when i invoke this "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)"
@marlegagaming12743 жыл бұрын
I'm getting this error, could you please help me out readValue(JsonParser, Class) in the type ObjectMapper is not applicable for the arguments (Object, new TypeReference(){})
@marlegagaming12743 жыл бұрын
Never mind, fixed it, programming in a nut shell🤣 One second : no idea what's going on After making minor changes : I'm the best 🤣😉 Thanks for the great video.
@hariprasadbs9664 жыл бұрын
I need this option in single java class file without any server like tomcat,glassfish or others When I try in single java class, I says error: No classdef error HTTPurirequest not found How to fix this
@FellTheSky4 жыл бұрын
I need to send first an authentication request to get SESSION ID cookie and then make another request to get the data. Do you have a video about this, or know where i can read it? Im having a hard time finding material
@alpanajyoti77743 жыл бұрын
did you get solution of above query? I have same problem, let me know , If you got solution.
@FellTheSky3 жыл бұрын
@@alpanajyoti7774 String cookie = response.headers().firstValue("Set-Cookie").toString(); String cCookie = cookie.replaceAll(".+\\[", ""); String cleanCookie = cCookie.split(";")[0]; System.out.println(cleanCookie) Then on the second request: .setHeader("Cookie",cleanCookie)
@Hector212113 жыл бұрын
excelente tutorial saludos desde argentina
@amirbeheshtian84263 жыл бұрын
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.
@srinivasmurthy33863 жыл бұрын
Nice!. Thanks for the g8 video.
@DanVega3 жыл бұрын
Thanks for watching!
@nikhilbansal1964 жыл бұрын
Thanks for the information. I have a question : how can we send a get request with parameters using HttpClient in java 11?
@lieutenantflogy61834 жыл бұрын
I am curious about this as well. I've been looking for an answer and have yet to find one.
@abigailedwards1238 Жыл бұрын
Thanky ou this is exactly what i needed
@DanVega Жыл бұрын
Glad I could help out, let me know if you have any other questions about clients in Java
@Pritam2523 жыл бұрын
Why my one says GET() is undefined?
@DanVega3 жыл бұрын
Do you have the correct imports? docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpRequest.Builder.html
@edwinkipruto71253 жыл бұрын
that was very easy to understand, would you kindly make a video in consuming rest services using authentications , and web tokens
@ritiksoni84879 ай бұрын
what was that intro ?
@DanVega8 ай бұрын
It was an old intro I had made. I don't use it anymore though
@alexandroskourtis52684 жыл бұрын
awesome tutorial :)
@haydn.murray4 жыл бұрын
Hey Dan - great tutorial!! - What would you recommend when your JSON is a map....ie `{"someData": [{a: 1, b: 2}]}` and all I want is the "someData" value. Map posts = mapper .readValue(response.body(), new TypeReference() {}); posts.get("someData") //
@20M_Target_1.02 жыл бұрын
How to login to Salesforce using Java 11 httpclient How get auth token and instanceUrl??
@Артур-з6щ7э3 жыл бұрын
very cool, thanks!
@DanVega3 жыл бұрын
No problem!
@stanislavivanov98174 жыл бұрын
Thank you for this tutorial.
@DanVega4 жыл бұрын
Thanks for watching 😊
@MegaMoses914 жыл бұрын
Great Tutorial!
@andrii58664 жыл бұрын
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.
@DanVega4 жыл бұрын
Thank you. I have really been enjoying using GraphQL on my personal site this past year. Yes, Spring Boot + GraphQL is on my list.
@jafd78064 жыл бұрын
Good content Bro 👌
@TTYounga4 жыл бұрын
Thank you so much!
@ruhnet4 жыл бұрын
Fantastic video! Thanks so much for taking the time to share it. I'm not fluent in Java but your video was still understandable and useful! One thing though, for future reference, the proper pronunciation of JSON is "jaysun", rather than "jay-sawn". 😀
@arkanglegeibriel3 жыл бұрын
"There's a lot of argument about how you pronounce that. I strictly don't care. I think the proper pronunciation is probably..." and then the guy uses a strange french-sounding pronunciation. So who said this? Well that'd be Douglas Crockford, the guy who invented the format. He says it like you do "jaysun". And I know this comment is old, but it's one of the top of this video so I'ma just... correct that number and that statement and move on, have a nice day ^_^
@30sana3 жыл бұрын
Honestly after all that ima just consider learning python to use requests easier wtf xD