Courseiva

200-901 Understanding and Using APIs Practice Question

A developer is making a GET request to a REST API and needs to specify that the response should be in JSON format. Which HTTP header should be set?

⚠ Common exam trap

Cisco often tests the distinction between Content-Type (for request body) and Accept (for response body), leading candidates to mistakenly choose Content-Type because they confuse 'sending' data with 'receiving' data.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Accept

The Accept header is used by the client to tell the server which media types (e.g., application/json) it can understand and prefers for the response. In a GET request, the client does not send a body, so Content-Type is irrelevant for specifying the response format. Setting Accept: application/json ensures the server returns JSON if it supports that format.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Content-Type

    Why it's wrong here

    Content-Type describes the media type of the request body; a GET typically has no body, and it does not tell the server which response format to return. It is tempting because it names a media type, and it would be correct when POSTing or PUTting JSON so the server parses the payload correctly.

  • ✗

    User-Agent

    Why it's wrong here

    User-Agent identifies the requesting client software to the server; it cannot request a JSON representation. It is tempting because it is a common request header, and it would be correct when the server needs client identification for logging, analytics, or content negotiation based on browser capabilities.

  • ✗

    Authorization

    Why it's wrong here

    Authorization carries credentials for authenticating the caller; it does not negotiate the response representation. It is tempting because it is a standard request header, and it would be correct when the API requires a bearer token or basic credentials to permit the GET at all.

  • ✓

    Accept

    Why this is correct

    The Accept request header tells the server which media types the client can handle, so setting Accept: application/json requests a JSON response. This satisfies the stem's requirement to specify JSON as the desired response format.

About these practice questions

One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.