Bird
0
0

Which HTTP method should be used with the URL /orders/456 to update an existing order?

easy📝 Syntax Q12 of 15
Rest API - URL and Resource Design
Which HTTP method should be used with the URL /orders/456 to update an existing order?
APUT
BPOST
CDELETE
DGET
Step-by-Step Solution
Solution:
  1. Step 1: Match HTTP methods to actions

    GET retrieves data, POST creates new data, PUT updates existing data, DELETE removes data.
  2. Step 2: Identify update action

    To update an existing order at /orders/456, the correct HTTP method is PUT.
  3. Final Answer:

    PUT -> Option A
  4. Quick Check:

    Update = PUT [OK]
Quick Trick: PUT updates, POST creates, GET reads, DELETE removes [OK]
Common Mistakes:
MISTAKES
  • Using POST to update instead of create
  • Using GET to modify data
  • Confusing PUT and DELETE methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes