Bird
0
0

Which of the following is the correct syntax for a simple GET request URL to fetch user data from 'api.example.com'?

easy📝 Syntax Q3 of 15
Rest API - REST API Fundamentals
Which of the following is the correct syntax for a simple GET request URL to fetch user data from 'api.example.com'?
Ahttps://api.example.com/getUser
Bhttps://api.example.com/user?id=123
Chttps://api.example.com/postUser
Dhttps://api.example.com/deleteUser/123
Step-by-Step Solution
Solution:
  1. Step 1: Identify URL structure for GET requests

    GET requests often use query parameters to specify data, like '?id=123'.
  2. Step 2: Check which URL uses query parameters correctly

    https://api.example.com/user?id=123 uses '?id=123' to fetch user data, which is correct.
  3. Final Answer:

    https://api.example.com/user?id=123 -> Option B
  4. Quick Check:

    GET request URL with query = https://api.example.com/user?id=123 [OK]
Quick Trick: GET URLs often use ?key=value for parameters [OK]
Common Mistakes:
  • Using POST or DELETE URLs for GET requests
  • Missing query parameters for data filtering
  • Confusing URL paths with HTTP methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes