Rest template Vs feign service




Asked on July 16, 2017

For testing external APIs which rest client is the best? Weather to user "Rest Template" or "Feign service"?


Thanks & Regards

Shilpa Kulkarni




Replied on July 19, 2017
You can use RestTemplate, JerseyClient etc but Feign Service could be easier to write HTTP Client code.



Replied on March 07, 2018
There is another big player which has been garnering rave reviews as a declarative rest client, it is called Retrofit. Retrofit supports Callback and RxJava/RxJava2 for asynchronous non-blocking I/O.

if you are using spring framework then RestTemplate may be your preferred choice due to spring-cloud supporting netflix OSS where you further want to use Ribbon/Hystrix or other netflix projects.

configuring Retrofit to integrate with Ribbon comes with a little bit tweaking.
so decide what is your requirement and chose.


Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us