Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 219
An architect must optimize traffic that targets a popular API endpoint. Currently, the application downloads a large file hourly, but often the file is unchanged and the download causes unnecessary load and delays. Which cURL command must be used to determine the last modified date of the file and to optimize the API usage?
Answer options
- A. curl -H 'Cache-Control: no-cache' request
- B. curl HEAD request
- C. curl --silent request
- D. curl GET request
Correct answer: B
Explanation
The correct answer is B, as the 'curl HEAD' command retrieves the headers from a server without downloading the body, which includes the last modified date of the file. Options A, C, and D are incorrect because they do not specifically focus on fetching metadata without transferring the entire file, which is essential for optimizing API usage.