Bird
0
0

Which of the following is the correct syntax to send an OPTIONS request using curl?

easy📝 Syntax Q12 of 15
Rest API - HTTP Methods
Which of the following is the correct syntax to send an OPTIONS request using curl?
Acurl -X POST https://api.example.com/resource
Bcurl -X HEAD https://api.example.com/resource
Ccurl -X OPTIONS https://api.example.com/resource
Dcurl --get https://api.example.com/resource
Step-by-Step Solution
Solution:
  1. Step 1: Identify the method flag in curl

    The -X option specifies the HTTP method to use.
  2. Step 2: Match the method to the question

    To send an OPTIONS request, use -X OPTIONS.
  3. Final Answer:

    curl -X OPTIONS https://api.example.com/resource -> Option C
  4. Quick Check:

    curl -X OPTIONS sends OPTIONS request [OK]
Quick Trick: Use curl -X OPTIONS to send OPTIONS request [OK]
Common Mistakes:
  • Using -X HEAD instead of OPTIONS
  • Using --get which sends GET request
  • Using POST method incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes