API Design · Junior · Question 2 of 75
Which URL design follows common REST conventions?
- 1
GET /getOrdersForUser?id=42 - ✓Correct answer:
GET /users/42/orders - 3
POST /users/42/getOrders
Explanation
URLs name resources (nouns, usually plural); the HTTP method says what to do. Verbs in paths are an RPC style.