Bird
0
0

Which of the following is the correct syntax for a pagination link in an HTTP header?

easy📝 Syntax Q12 of 15
Rest API - HATEOAS and Linking
Which of the following is the correct syntax for a pagination link in an HTTP header?
ALink: <https://api.example.com/items?page=2>; rel="next"
BLink: https://api.example.com/items?page=2 rel=next
CLink: <https://api.example.com/items?page=2> rel=next
DLink: https://api.example.com/items?page=2; rel="next"
Step-by-Step Solution
Solution:
  1. Step 1: Review correct Link header format

    The URL must be enclosed in angle brackets <> and rel value in quotes.
  2. Step 2: Match syntax with options

    Link: ; rel="next" correctly uses <URL> and rel="next" with quotes.
  3. Final Answer:

    Link: <https://api.example.com/items?page=2>; rel="next" -> Option A
  4. Quick Check:

    Link header syntax = <URL>; rel="value" [OK]
Quick Trick: Use angle brackets for URL and quotes for rel value [OK]
Common Mistakes:
  • Omitting angle brackets around URL
  • Not quoting the rel attribute value
  • Missing semicolon between URL and rel

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes