Bird
0
0

Which of the following is the correct syntax to include pagination info in a REST API response header?

easy📝 Syntax Q3 of 15
Rest API - Advanced Patterns
Which of the following is the correct syntax to include pagination info in a REST API response header?
A"Accept: text/html"
B"X-Total-Count: 100"
C"Authorization: Bearer token"
D"Content-Type: application/json"
Step-by-Step Solution
Solution:
  1. Step 1: Identify pagination header

    Pagination info is often sent in custom headers like "X-Total-Count" to indicate total items.
  2. Step 2: Match options to pagination

    Only "X-Total-Count: 100" shows a header related to pagination count.
  3. Final Answer:

    "X-Total-Count: 100" -> Option B
  4. Quick Check:

    Pagination header syntax = X-Total-Count [OK]
Quick Trick: Use X-Total-Count header for total items in pagination [OK]
Common Mistakes:
MISTAKES
  • Confusing Content-Type with pagination
  • Using Authorization header for pagination
  • Using Accept header incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes