You are writing a single-page web application with a user-interface that communicates with a third-party API for content using XMLHttpRequest. The data displayed on the UI by the API results is less critical than other data displayed on the same web page, so it is acceptable for some requests to not have the API data displayed in the UI. However, calls made to the API should not delay rendering of other parts of the user interface. You want your application to perform well when the API response is an error or a timeout. What should you do?
A) Set the asynchronous option for your requests to the API to false and omit the widget displaying the API results when a timeout or error is encountered. Set the asynchronous option for your requests to the API to false and omit the widget displaying the API results when a timeout or error is encountered.
B) Set the asynchronous option for your request to the API to true and omit the widget displaying the API results when a timeout or error is encountered. Set the asynchronous option for your request to the API to true
C) Catch timeout or error exceptions from the API call and keep trying with exponential backoff until the API response is successful.
D) Catch timeout or error exceptions from the API call and display the error response in the UI widget.
Correct Answer:
Verified
Q9: Your teammate has asked you to review
Q10: You want to upload files from an
Q11: You are developing an HTTP API hosted
Q12: You are building a new API. You
Q13: Your service adds text to images that
Q15: You are load testing your server application.
Q16: You are deploying your application to a
Q17: You are deploying your application to a
Q18: You have deployed an HTTP(s) Load Balancer
Q19: You want to notify on-call engineers about
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents