Using Retrofit to make HTTP calls
HTML-код
- Опубликовано: 24 окт 2024
- make http REST calls, pass in parameters, use dynamic paths, call asynchronously and more..
Channel
----------------------------------
Master difficult programming concepts in few minutes. I try to explain difficult concepts like Java concurrency in simple to understand manner. Explore videos on topics like Spring Boot, Cloud Foundry, Java 8 and more. I am happy to clarify your doubts. Ask me anything in the comments. Also happy to take requests for new videos.
New video added every Sunday.
Subscribe or explore the channel - bit.ly/defog_tech
Current Playlists
----------------------------------
Java Executor Service - bit.ly/exec_srvc
Java Concurrency - bit.ly/java_crncy
Spring Boot 2.0 - bit.ly/spr_boot2
Java 8 - bit.ly/java_8-11
Intellij IDEA Shortcuts - bit.ly/i_idea
Popular Videos
----------------------------------
Executor Service - • Java ExecutorService -...
Introduction to CompletableFuture - • Introduction to Comple...
Understand how ForkJoinPool works - • Understanding how Fork...
Java Memory Model in 10 minutes - • Java Memory Model in 1...
Volatile vs Atomic - • Using volatile vs Atom...
What is Spring Webflux - • What is Spring Webflux...
Very clear, to-the-point and succinct explanations. you ought to start classes locally. Thank you very much.
Very nice and crisp explanation, although we work everyday with http clients but ur videos are worth watching and refreshing
Excellent tutorial very nicely prepared to the point and easy to understand
Plain, Elegant and simple. Awesome.
This was amazing man, thank you very much!
Nice
Amizing explaination !
Thank you
Excellent.
How does it different from FeignClient which comes with Spring Cloud project?
Not much different. RestTemplate of Spring also can achieve similar things.
How will we implement retry and timeout in retrofit
great!
Thanks for the tutorial. Why should i go for this when rest template can do the same ? Pls clarify
Good question. I haven't used rest template much so cannot say authoritatively.. but retrofit is most popular Android http library out there, and I am sure it has more features than rest template of spring
RestTemplate is a good option to make an API call. We can also use Feign client to make HTTP calls, which is essentially an interface based approach and Spring would provide an implementation for the interface. We can also define our custom load-balancing mechanism to make such calls (In which case it is recommended to use a discovery server).
This also supports completablefuture out of the box
How is performance as compared to RestTemplate ?
Haven't checked but I'm positive it will be comparable. One thing spring template doesn't have it's asynchronous call.. for that you have to use new web client of spring 5.0
Are those slides available somewhere?
Could you give as this as kotlin
How it is different from sleuth?
Sleuth is for distributed tracing isn't it? Retrofit is a simple http client