101 · Question #496
A client needs to learn if a web server supports POST Which HTTP method is used?
The correct answer is A. OPTIONS. The HTTP OPTIONS method is used by clients to discover which HTTP methods a server or resource supports, making it the correct choice for learning if POST is available.
Question
A client needs to learn if a web server supports POST Which HTTP method is used?
Options
- AOPTIONS
- BTRACE
- CLIST
- DGET
How the community answered
(31 responses)- A87% (27)
- B3% (1)
- C3% (1)
- D6% (2)
Why each option
The HTTP OPTIONS method is used by clients to discover which HTTP methods a server or resource supports, making it the correct choice for learning if POST is available.
The OPTIONS method requests information about the communication options available for a target resource; the server responds with an Allow header that lists the supported HTTP methods such as GET, POST, PUT, and DELETE, allowing clients to determine capability before submitting requests.
TRACE echoes the received request back to the client for loop-back diagnostic testing purposes, not for discovering which methods the server supports.
LIST is not a standard HTTP method defined in RFC 9110 or its predecessors and is not recognized by standard HTTP servers.
GET retrieves the content of a specified resource but does not return information about which HTTP methods the server or resource supports.
Concept tested: HTTP OPTIONS method for server capability discovery
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
Topics
Community Discussion
No community discussion yet for this question.