Reputation: 92387
If a HTTP resource is not able to handle a request with the given HTTP method, it should send an Allow
header to list the allowed HTTP methods. Another possibility to get a response with an Allow
header is to send a request with the OPTIONS
method.
I'm wondering whether the Allow
header should contain the OPTIONS
method itself.
Example:
Allow: GET, PUT, DELETE, OPTIONS
or
Allow: GET, PUT, DELETE
What is correct?
Upvotes: 9
Views: 4935
Reputation: 16370
I don't see why not. The OPTIONS
request method is used to request information about the communication options available for the requested URI. Some clients use OPTIONS
to determine communication requirements and the server's capabilities without having to retrieve or perform an action on the requests resource.
Upvotes: 10