Bird
0
0

This HTTP request header is sent:

medium📝 Debug Q7 of 15
Rest API - Request and Response Format
This HTTP request header is sent:
Accept: application/json

But the server responds with HTML. What is the likely cause?
AServer does not support JSON responses
BAccept header is misspelled
CContent-Type header is missing
DClient must send POST method
Step-by-Step Solution
Solution:
  1. Step 1: Understand Accept header purpose

    Accept header requests JSON response, but server may not support it.
  2. Step 2: Analyze why server sends HTML

    If server cannot provide JSON, it defaults to HTML or another format.
  3. Final Answer:

    Server does not support JSON responses -> Option A
  4. Quick Check:

    Unsupported Accept type = fallback response [OK]
Quick Trick: Server may ignore Accept if format unsupported [OK]
Common Mistakes:
MISTAKES
  • Assuming Accept header spelling error
  • Thinking Content-Type affects response format
  • Believing HTTP method affects Accept header

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes