Bird
0
0

A client sends:

medium📝 Debug Q7 of 15
Rest API - Request and Response Format
A client sends:
Accept: application/json, text/plain
The server responds with XML. What is the likely problem?
AClient requested XML explicitly
BClient sent invalid Accept header
CServer ignored the Accept header
DServer does not support JSON or plain text
Step-by-Step Solution
Solution:
  1. Step 1: Analyze client Accept header

    Client requests JSON or plain text formats only.
  2. Step 2: Server response mismatch

    Server responded with XML, which client did not accept.
  3. Step 3: Identify cause

    Server likely ignored Accept header or defaulted to XML.
  4. Final Answer:

    Server ignored the Accept header -> Option C
  5. Quick Check:

    Server ignoring Accept header causes wrong format [OK]
Quick Trick: Server must honor Accept header or risk wrong format [OK]
Common Mistakes:
  • Blaming client for invalid header
  • Assuming client requested XML
  • Ignoring server configuration issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes