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.
Solved! Go to Solution.
Views
Replies
Total Likes
Back end is the way to go as you have much better control with Java/OSGi. Use front end to display the data.
There is a sample package and article for this use case:
https://helpx.adobe.com/experience-manager/using/restful-services.html
This will point you in the right direction.
Views
Replies
Total Likes
Hi
It really depends on the use-case we are trying to achieve.
Front-End
1. Load on server reduces.
2. Number of hops to the data reduces.
3. If we are using public api's.
Back-End
1. Can be more Secure
2. If authentication is needed them Back-End is considered.
3. If we are calling same API's over and over, then we can save/cache the data (caching) and revert immediately.
4. if we need to change/validate the data so Back-end is used.
I hope this will answer your problem.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Back end is the way to go as you have much better control with Java/OSGi. Use front end to display the data.
There is a sample package and article for this use case:
https://helpx.adobe.com/experience-manager/using/restful-services.html
This will point you in the right direction.
Views
Replies
Total Likes
I agree with Steve - Approach 2 is far better way to consume a 3rd party Restful service.
Views
Replies
Total Likes
The URL in these answers really need to be updated. There's a lot of old accepted solutions here with dead documentation links.
Views
Likes
Replies