Bird
0
0

Identify the error in this URL with search parameters:

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

Identify the error in this URL with search parameters:

https://api.example.com/products?category=books&price=20?sort=asc
AUsing two question marks (?) for parameters
BMissing & between parameters
CUsing = instead of : in parameters
DParameters should be in the URL path, not query
Step-by-Step Solution
Solution:
  1. Step 1: Check parameter separators

    Only the first parameter uses ?, others must use &.
  2. Step 2: Identify the error in the URL

    The URL incorrectly uses a second ? before sort=asc instead of &.
  3. Final Answer:

    Using two question marks (?) for parameters -> Option A
  4. Quick Check:

    Only one ? allowed, others use & [OK]
Quick Trick: Only one ? in URL, then & for others [OK]
Common Mistakes:
  • Using multiple ? instead of &
  • Confusing = with : in parameters
  • Thinking parameters belong in URL path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes