Bird
0
0

Examine this REST API response:

medium📝 Predict Output Q4 of 15
Rest API - HTTP Status Codes
Examine this REST API response:
HTTP/1.1 201 Created
Location: /orders/789

{"id":789,"item":"Laptop"}

What is the purpose of the Location header in this response?
AIt indicates the server's current time
BIt provides the URI of the newly created resource
CIt specifies the content type of the response
DIt shows the client's IP address
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the 201 Created status

    This status means a new resource was created.
  2. Step 2: Understand the Location header

    Location header provides the URI where the new resource can be accessed.
  3. Final Answer:

    It provides the URI of the newly created resource -> Option B
  4. Quick Check:

    Location header points to new resource URI [OK]
Quick Trick: Location header shows new resource URL [OK]
Common Mistakes:
  • Thinking Location is about server time
  • Confusing Location with content type
  • Assuming Location shows client info

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes