CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 4: Google Cloud Professional Cloud Developer

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…

Nội dung câu hỏi

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?

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. 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.
  2. 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. — đáp án hiện tại
  3. C. Catch timeout or error exceptions from the API call and keep trying with exponential backoff until the API response is successful.
  4. D. Catch timeout or error exceptions from the API call and display the error response in the UI widget.

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề