If I have a web application built with MVC 5 and a service using Web API 2. Is it a good practice the following scenario?
MVC UI jQuery --> call Web API 2 endpoint --> which will call another service
Ex:
- Application is at : http://domain.com
- When user visits application clicks a button
- jQuery click event handler of the button makes a GET REST call to http://domain.com/api/user/getdata
- The action
GetDatafrom ApiControllerUsermakes a GET REST call to http://anotherserver.com/api/something using C# code 5 When the call from Number 4 returns data, the actionGetDatafrom Number 4 will return that data to the Number 3 (the original requester jQuery).