Bird
0
0

In media type versioning for REST APIs, which HTTP header does the client use to indicate the desired API version?

easy📝 Conceptual Q2 of 15
Rest API - Versioning Strategies
In media type versioning for REST APIs, which HTTP header does the client use to indicate the desired API version?
AAuthorization
BContent-Type
CAccept
DUser-Agent
Step-by-Step Solution
Solution:
  1. Step 1: Identify headers related to content negotiation

    The Accept header is used by clients to specify the media types they can handle.
  2. Step 2: Understand versioning via media type

    Media type versioning encodes the API version within the media type in the Accept header.
  3. Final Answer:

    Accept -> Option C
  4. Quick Check:

    Version info is in Accept header [OK]
Quick Trick: Accept header carries version info in media type [OK]
Common Mistakes:
  • Using Content-Type instead of Accept for versioning
  • Confusing Authorization with version specification
  • Assuming User-Agent controls API version

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes