質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top