Bird
0
0

A developer writes this Link header:

medium📝 Debug Q6 of 15
Rest API - HATEOAS and Linking
A developer writes this Link header:
Link: <https://api.example.com/items?page=3> rel="next", <https://api.example.com/items?page=1> rel="prev"
What is the error in this header?
Arel attribute values should not be quoted
BMissing semicolons before rel attributes
CURLs should not be in angle brackets
DLink header cannot have multiple URLs
Step-by-Step Solution
Solution:
  1. Step 1: Check correct Link header syntax

    Each link must have a semicolon before the rel attribute.
  2. Step 2: Identify missing semicolons

    The header is missing semicolons before rel="next" and rel="prev".
  3. Final Answer:

    Missing semicolons before rel attributes -> Option B
  4. Quick Check:

    Semicolon before rel is required [OK]
Quick Trick: Always put semicolon before rel attribute [OK]
Common Mistakes:
  • Omitting semicolons
  • Removing angle brackets
  • Not quoting rel values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes