Search code examples
httphttp-response-codeshttp-options-method

What HTTP response code should be used for an OPTION request?


I noticed that the Mozilla HTTP response codes documentation states that

The methods PUT, DELETE, and OPTIONS can never result in a 200 OK response.

However it doesn't make clear what response should actually be used. My best guess would be 204:

204 : No Content

There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.

Can anyone comment as to whether or not this is the correct code to be using to response to an OPTIONS request?


Solution

  • Well, in that case the Mozilla documentation is plainly wrong.