Best way to consume Third party rest api
What is best method to use third party rest api. According to me there are two ways.
Approach 1. Make JavaScript Ajax Calls to consume the REST API.
Approach 2. Use a HttpClient on the OSGI Service Layer to consume these services.
What is they best way and why. Can you please help.