220-1102 exam dumps

220-1102 practice question 256 of 828

A+ Core 2. Associate level, CompTIA. Free question with the correct answer and a full explanation.

220-1102 Question 256

Single answercurl

A help desk technician is troubleshooting whether a Linux workstation can reach an internal software repository at https://repo.corp.example.com. The technician wants to test only the HTTP response headers first, without downloading the full page content, so they can quickly verify that the server is reachable and responding. Which command should the technician use?

  1. A
  2. B
  3. C
  4. D
Show answer and explanation

Correct answer: A

Explanation

For this scenario, the best choice is curl -I because it performs a header-only request, which is a practical way to confirm that a web service is reachable and responding. This is commonly used by technicians during connectivity and web service troubleshooting because it is faster and less disruptive than downloading the full resource. By contrast, -O downloads the content, -d sends request data, and -X DELETE changes the HTTP method to one that could be unsafe in a production environment. According to curl documentation, -I/--head fetches the headers only, making it the appropriate choice when verifying HTTP status and response headers during diagnostics.

  • A. Correct.

    Correct. The -I option tells curl to fetch only the HTTP headers using a HEAD request. This is useful for quickly confirming connectivity and checking the server's response status without downloading the body of the page or file.

  • B. Incorrect.

    Incorrect. The -O option tells curl to download the resource and save it using the remote filename. This does not limit the request to headers only, so it would download content rather than just verifying the response headers.

  • C. Incorrect.

    Incorrect. The -d option is used to send data in the request body, typically for an HTTP POST request. It is not used to retrieve only headers, and using it this way would not match the technician's goal.

  • D. Incorrect.

    Incorrect. The -X DELETE option forces curl to use the HTTP DELETE method. That method is intended to request deletion of a resource and is not appropriate for safely testing whether a repository is reachable.

Timed practice exam

Take a 220-1102 practice test under exam conditions

90 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam