Bird
0
0

Given a REST API endpoint that supports GET and POST, what will the Allow header contain in response to an OPTIONS request?

medium📝 Predict Output Q5 of 15
Rest API - HTTP Methods
Given a REST API endpoint that supports GET and POST, what will the Allow header contain in response to an OPTIONS request?
AAllow: GET, POST
BAllow: HEAD, OPTIONS
CAllow: DELETE, PUT
DAllow: PATCH
Step-by-Step Solution
Solution:
  1. Step 1: Understand the Allow header in OPTIONS response

    The Allow header lists all HTTP methods supported by the resource, such as GET and POST in this case.
  2. Step 2: Verify the correct methods listed

    Since the endpoint supports GET and POST, the Allow header must include these methods only.
  3. Final Answer:

    Allow: GET, POST -> Option A
  4. Quick Check:

    Allow header = Supported methods [OK]
Quick Trick: Allow header lists supported HTTP methods [OK]
Common Mistakes:
  • Listing unsupported methods in Allow header
  • Confusing Allow header with Accept header
  • Omitting supported methods in Allow header

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes