Bird
0
0

What is wrong with this URL? /api/search?query=phone&

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

What is wrong with this URL? /api/search?query=phone&

ATrailing & without a parameter value is invalid.
BMissing ? before parameters.
CParameters must be separated by commas.
DURL path is incorrect.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the URL ending

    The URL ends with an & which expects another parameter but none is provided.
  2. Step 2: Understand parameter separator usage

    The & symbol separates parameters and cannot be at the end without a following parameter.
  3. Final Answer:

    Trailing & without a parameter value is invalid. -> Option A
  4. Quick Check:

    No trailing & allowed without parameter [OK]
Quick Trick: Don't end URL with & without next parameter [OK]
Common Mistakes:
  • Leaving trailing & at the end
  • Using commas instead of &

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes