Bird
Raised Fist0

Why does RFC 7807 recommend using a URI for the type field instead of a simple string?

hard🧠 Conceptual Q10 of Q15
Rest API - Error Handling
Why does RFC 7807 recommend using a URI for the type field instead of a simple string?
ABecause URIs are shorter than strings
BTo make the response size smaller
CTo enforce the use of HTTPS only
DTo allow clients to retrieve machine-readable documentation about the problem
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of the type URI

    The URI allows clients to access more detailed, machine-readable documentation about the error type.
  2. Step 2: Evaluate other options

    URIs are not necessarily shorter, HTTPS is not enforced, and size reduction is not the goal.
  3. Final Answer:

    To allow clients to retrieve machine-readable documentation about the problem -> Option D
  4. Quick Check:

    type URI = link to error docs [OK]
Quick Trick: type URI links to detailed error info [OK]
Common Mistakes:
MISTAKES
  • Thinking URIs are for size reduction
  • Assuming HTTPS is mandatory
  • Believing type is just a short string

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes