Bird
0
0

Which JSON key correctly specifies the HTTP method used by an API endpoint?

easy📝 Syntax Q3 of 15
Rest API - API Documentation
Which JSON key correctly specifies the HTTP method used by an API endpoint?
A"httpMethod": "GET"
B"type": "PUT"
C"action": "DELETE"
D"method": "POST"
Step-by-Step Solution
Solution:
  1. Step 1: Identify the standard key for HTTP method

    In REST API documentation, the key "method" is conventionally used to specify the HTTP method.
  2. Step 2: Evaluate the options

    "method": "POST" uses "method" with a valid HTTP method "POST". Other options use incorrect keys like "httpMethod", "action", or "type" which are not standard.
  3. Final Answer:

    "method": "POST" -> Option D
  4. Quick Check:

    Standard key is "method" [OK]
Quick Trick: Use "method" key to specify HTTP method [OK]
Common Mistakes:
MISTAKES
  • Using non-standard keys like "httpMethod" or "action"
  • Confusing HTTP method with request body content
  • Omitting the method key entirely

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes