Bird
0
0

Given this Accept header:

medium📝 Predict Output Q4 of 15
Rest API - Versioning Strategies
Given this Accept header:
Accept: application/vnd.shop.v1+json
What version of the API will the server respond with?
AVersion 2
BVersion 0
CVersion 1
DVersion 3
Step-by-Step Solution
Solution:
  1. Step 1: Parse the Accept header

    The header specifies 'v1' which means version 1 of the API.
  2. Step 2: Confirm version number

    Since 'v1' is explicitly stated, the server will respond with version 1.
  3. Final Answer:

    Version 1 -> Option C
  4. Quick Check:

    Accept header version = 1 [OK]
Quick Trick: Version number follows 'v' in media type [OK]
Common Mistakes:
  • Ignoring the version number in media type
  • Assuming default version if not recognized
  • Confusing version with vendor name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes