Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 5
A client is written that uses a REST API to interact with a server. Using HTTPS as the transport, an HTTP request is sent and received an HTTP response. The response contains the HTTP response status code: 503 Service Unavailable.
Which action is the appropriate response?
Answer options
- A. Add an Authorization header that supplies appropriate credentials and sends the updated request.
- B. Resend the request using HTTP as the transport instead of HTTPS.
- C. Add an Accept header that indicates the content types that the client understands and send the updated request.
- D. Look for a Retry-After header in the response and resend the request after the amount of time indicated.
Correct answer: D
Explanation
The correct response is D because a 503 Service Unavailable status indicates that the server is temporarily unable to handle the request, and it may provide a Retry-After header to indicate when it is appropriate to try again. Options A, B, and C do not address the temporary unavailability of the service and would not resolve the issue effectively.