Imagine you are developing a web application that needs to fetch data from a third-party service. How would you use a Web API to achieve this?

  • Create a local database copy of the third-party data
  • Embed the third-party service's code directly in your application
  • Make a direct HTTP request to the third-party service's endpoint
  • Use a WebSocket connection to the third-party service
When integrating with a third-party service, it's common to use a direct HTTP request to the service's API endpoints. This allows your application to fetch data from the service in real-time and maintain a connection with the third-party server. WebSocket is generally not used for fetching data, embedding code directly can lead to issues, and creating a local database copy may not be practical for real-time data.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *