Bird
0
0

What is wrong with this URL used for filtering: /api/products?brand=apple&size=?

medium📝 Debug Q6 of 15
Rest API - URL and Resource Design

What is wrong with this URL used for filtering: /api/products?brand=apple&size=?

AThe 'brand' parameter should be capitalized
BThe '&' symbol is incorrectly used
CThe 'size' parameter has no value assigned
DThere should be a question mark instead of '&'
Step-by-Step Solution
Solution:
  1. Step 1: Check parameter assignments

    Each query parameter must have a key and a value.
  2. Step 2: Identify the issue

    Here, 'size=' has no value after the equals sign, which is invalid.
  3. Final Answer:

    The 'size' parameter has no value assigned -> Option C
  4. Quick Check:

    Every query parameter needs a value [OK]
Quick Trick: Every query parameter needs a value [OK]
Common Mistakes:
  • Leaving parameters without values
  • Misusing & symbol
  • Incorrect capitalization of parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes