Bird
0
0

Which of the following is the correct syntax to perform an idempotent DELETE request using curl?

easy📝 Syntax Q12 of 15
Rest API - HTTP Methods
Which of the following is the correct syntax to perform an idempotent DELETE request using curl?
Acurl -X DELETE https://api.example.com/resource/123
Bcurl -X POST https://api.example.com/resource/123
Ccurl -X PUT https://api.example.com/resource/123
Dcurl -X GET https://api.example.com/resource/123
Step-by-Step Solution
Solution:
  1. Step 1: Identify the HTTP method for deletion

    DELETE is the HTTP method used to remove a resource and is idempotent.
  2. Step 2: Check curl syntax for DELETE

    The correct curl command uses -X DELETE followed by the resource URL.
  3. Final Answer:

    curl -X DELETE https://api.example.com/resource/123 -> Option A
  4. Quick Check:

    DELETE method syntax = C [OK]
Quick Trick: DELETE uses -X DELETE in curl command [OK]
Common Mistakes:
  • Using POST instead of DELETE
  • Omitting -X flag for method
  • Confusing GET with DELETE

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes