Bird
0
0

You want to remove a user with ID 45 using an HTTP request, but the request POST /users/45 is not working. What is the correct method to use?

medium📝 Debug Q14 of 15
Rest API - HTTP Methods
You want to remove a user with ID 45 using an HTTP request, but the request POST /users/45 is not working. What is the correct method to use?
AGET
BPUT
CDELETE
DPATCH
Step-by-Step Solution
Solution:
  1. Step 1: Understand the intent of the request

    The goal is to remove (delete) a user, so the method must express deletion.
  2. Step 2: Choose the HTTP method for deletion

    DELETE is the standard method to remove a resource identified by a URL.
  3. Final Answer:

    DELETE -> Option C
  4. Quick Check:

    Remove resource = DELETE [OK]
Quick Trick: DELETE removes resources, POST does not [OK]
Common Mistakes:
  • Using POST to delete
  • Confusing PATCH with DELETE
  • Trying GET to remove data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes