Bird
0
0

Find the mistake in this URL intended to access comment 9 on post 15: /posts/15/comments9

medium📝 Debug Q7 of 15
Rest API - URL and Resource Design
Find the mistake in this URL intended to access comment 9 on post 15: /posts/15/comments9
AID should be before resource name
BMissing slash between 'comments' and '9'
CComments should be a query parameter
DPost ID is incorrect
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the URL format

    The URL combines 'comments' and '9' without a slash, making it a single segment.
  2. Step 2: Correct URL structure

    Resource name and ID must be separated by a slash: /comments/9.
  3. Final Answer:

    Missing slash between 'comments' and '9' -> Option B
  4. Quick Check:

    Separate resource and ID with slash [OK]
Quick Trick: Always separate resource and ID with a slash [OK]
Common Mistakes:
  • Concatenating resource name and ID
  • Placing ID before resource name
  • Using query parameters incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes