HttpClient vs Spring Vacation Template?

What is the best way to make a REST call?

Should I use Apache Http Clientor use Spring Rest Template.

On what basis can I decide which one should I go for?

I need to call this url -

http://localhost:8080/service/Service/v1/get/USERID=10000/profile.ACCOUNT.SERVICE"

And after getting the answer back, I just need to find out if this answer contains any particular string or not.

+7
source share
1 answer

Spring RestTemplatefollows the pattern for all classes in the main * Templates Spring structure and different sub-segments: JdbcTemplate, HibernateTemplate, WebServiceTemplateetc. etc.

, ( , -). HttpClient.

, spring-web .

+13