Bird
0
0

A client sends this header:

medium📝 Debug Q14 of 15
Rest API - Versioning Strategies
A client sends this header:
Accept: application/vnd.example.v1+json
But the server responds with version 2 data. What is the likely cause?
AAccept header syntax is invalid
BClient sent wrong Content-Type header
CServer does not support version 2
DServer ignores Accept header and defaults to latest version
Step-by-Step Solution
Solution:
  1. Step 1: Analyze client request and server response

    The client requests version 1 via Accept header, but server returns version 2 data.
  2. Step 2: Identify server behavior

    This usually means the server ignores the Accept header and serves the latest version by default.
  3. Final Answer:

    Server ignores Accept header and defaults to latest version -> Option D
  4. Quick Check:

    Server ignoring Accept header causes version mismatch [OK]
Quick Trick: Mismatch means server likely ignores Accept header [OK]
Common Mistakes:
  • Blaming client Content-Type instead of Accept
  • Assuming Accept header syntax error without checking
  • Thinking server lacks version 2 support

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes