Bird
0
0

In a REST API, what information does a HEAD request provide compared to a GET request?

easy📝 Conceptual Q1 of 15
Rest API - HTTP Methods
In a REST API, what information does a HEAD request provide compared to a GET request?
ABoth response headers and body identical to GET
BOnly the response body without headers
COnly the response headers without the response body
DAn error indicating the method is not supported
Step-by-Step Solution
Solution:
  1. Step 1: Understand HEAD method

    The HEAD method requests the headers that a GET request would obtain, but without the response body.
  2. Step 2: Compare with GET

    GET returns both headers and body, while HEAD returns only headers.
  3. Final Answer:

    Only the response headers without the response body -> Option C
  4. Quick Check:

    HEAD = headers only, no body [OK]
Quick Trick: HEAD returns headers only, no body [OK]
Common Mistakes:
MISTAKES
  • Assuming HEAD returns the full response body
  • Confusing HEAD with OPTIONS method
  • Thinking HEAD returns only the body

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes