Bird
0
0

Identify the error in this URL: /api/items?color=red&size

medium📝 Debug Q6 of 15
Rest API - Query Parameters and Filtering

Identify the error in this URL: /api/items?color=red&size

AIncorrect use of & instead of ?.
BMissing value for the 'size' parameter.
CParameters should be separated by commas, not &.
DURL should not have any parameters.
Step-by-Step Solution
Solution:
  1. Step 1: Check each parameter for key and value

    The 'color=red' parameter is correct, but 'size' has no value assigned.
  2. Step 2: Understand parameter syntax

    Each parameter must have a key and a value separated by =; missing value causes error.
  3. Final Answer:

    Missing value for the 'size' parameter. -> Option B
  4. Quick Check:

    Parameters need key=value pairs [OK]
Quick Trick: Every parameter must have a value after = [OK]
Common Mistakes:
  • Leaving parameters without values
  • Confusing & and ? usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes