Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 20

A developer is writing an application that uses a REST API and the application requires a valid response from the API. Which element of the response is used in the conditional check?

Answer options

Correct answer: E

Explanation

The status code is essential for determining the outcome of the API request, as it indicates whether the request was successful or if there was an error. The body, headers, link, and URL are important components of the response but do not directly indicate the success or failure of the request, which is the primary purpose of the status code.