Bird
0
0

Why does REST API design recommend avoiding verbs in URLs and relying on HTTP methods instead?

hard📝 Conceptual Q10 of 15
Rest API - URL and Resource Design
Why does REST API design recommend avoiding verbs in URLs and relying on HTTP methods instead?
ATo keep URLs simple and consistent by representing resources only
BBecause verbs in URLs improve SEO ranking
CTo make URLs longer and more descriptive
DBecause HTTP methods cannot be used with verbs in URLs
Step-by-Step Solution
Solution:
  1. Step 1: Understand REST URL philosophy

    REST URLs represent resources (nouns) to keep them simple and consistent.
  2. Step 2: Role of HTTP methods

    HTTP methods define the action (verbs) on those resources, avoiding redundancy and complexity in URLs.
  3. Final Answer:

    To keep URLs simple and consistent by representing resources only -> Option A
  4. Quick Check:

    Resources in URLs, actions in HTTP methods [OK]
Quick Trick: Keep URLs resource-focused; use HTTP methods for actions [OK]
Common Mistakes:
  • Thinking verbs improve URL clarity
  • Confusing URL design with SEO
  • Believing HTTP methods can't work with verbs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes