Bird
0
0

Identify the error in this URL for accessing a product with ID 55: /products//55

medium📝 Debug Q6 of 15
Rest API - URL and Resource Design
Identify the error in this URL for accessing a product with ID 55: /products//55
AMissing resource name before ID
BID must be at the start of the URL
CID should be a query parameter
DDouble slash causes incorrect resource path
Step-by-Step Solution
Solution:
  1. Step 1: Examine the URL structure

    The URL has two slashes between 'products' and '55', which is invalid syntax.
  2. Step 2: Understand URL path rules

    Double slashes create an empty path segment, confusing the server routing.
  3. Final Answer:

    Double slash causes incorrect resource path -> Option D
  4. Quick Check:

    Correct URL uses single slash between segments [OK]
Quick Trick: Avoid double slashes in URL paths [OK]
Common Mistakes:
  • Using double slashes accidentally
  • Putting ID in query instead of path
  • Misplacing ID at URL start

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes