Bird
0
0

A REST API developer notices that clients receive full response bodies on HEAD requests. What is the most probable reason?

medium📝 Debug Q6 of 15
Rest API - HTTP Methods
A REST API developer notices that clients receive full response bodies on HEAD requests. What is the most probable reason?
AThe server is returning a 404 error
BThe client is incorrectly sending GET requests instead of HEAD
CHEAD requests are not supported by HTTP/1.1
DThe server code returns the full response instead of omitting the body for HEAD
Step-by-Step Solution
Solution:
  1. Step 1: Understand HEAD behavior

    HEAD requests should return headers only, no body.
  2. Step 2: Identify server issue

    If full body is returned, server likely does not suppress body for HEAD requests.
  3. Final Answer:

    The server code returns the full response instead of omitting the body for HEAD -> Option D
  4. Quick Check:

    Server must omit body on HEAD requests [OK]
Quick Trick: Server must omit body on HEAD requests [OK]
Common Mistakes:
MISTAKES
  • Blaming client for sending wrong method
  • Thinking HTTP/1.1 does not support HEAD
  • Assuming 404 error causes full body

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes