Bird
0
0

Given this HTTP request header:

medium📝 Predict Output Q13 of 15
Rest API - Versioning Strategies
Given this HTTP request header:
Accept: application/vnd.example.v2+json
Which API version is the client requesting?
AVersion 2
BVersion 1
CVersion 3
DNo version specified
Step-by-Step Solution
Solution:
  1. Step 1: Parse the Accept header value

    The value application/vnd.example.v2+json includes v2, indicating version 2.
  2. Step 2: Confirm version number meaning

    The v2 part is a common pattern to specify version 2 of the API.
  3. Final Answer:

    Version 2 -> Option A
  4. Quick Check:

    v2 in Accept header means version 2 [OK]
Quick Trick: Look for 'v' followed by number in Accept header [OK]
Common Mistakes:
  • Ignoring the 'v2' part and guessing version 1
  • Assuming no version if not in URL
  • Confusing +json suffix with version

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes