Bird
Raised Fist0

If a client sends this Accept header:

medium📝 Predict Output Q5 of Q15
Rest API - Versioning Strategies
If a client sends this Accept header:
Accept: application/vnd.api.v2+xml
What media type and version is requested?
AVersion 3, XML format
BVersion 2, XML format
CVersion 2, JSON format
DVersion 1, JSON format
Step-by-Step Solution
Solution:
  1. Step 1: Identify version and format

    The media type includes 'v2' indicating version 2, and '+xml' indicates XML format.
  2. Step 2: Confirm correct option

    Version 2, XML format matches version 2 and XML format exactly.
  3. Final Answer:

    Version 2, XML format -> Option B
  4. Quick Check:

    Version 2 + XML = Version 2, XML format [OK]
Quick Trick: Version after 'v', format after '+' in media type [OK]
Common Mistakes:
MISTAKES
  • Mixing up XML and JSON formats
  • Ignoring version number in media type
  • Assuming default format if not JSON

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes