The HTTP OPTIONS
method is supposedly used to determine what other methods the server supports on a given resource. Given that, I have two questions:
What does this response look like? I have seen examples with CSV lists in
Public
,Allow
, and evenAccess-Control-Allow-Methods
headers. Are they all needed? What's the difference? RFC 2616 doesn't seem to be very helpful here.Would it be appropriate to use this to list the actions that a resource supports in a non-REST-API environment? For example, if my
ConversionController
supports the actionconvert
, would a response like this make sense:
Request:
OPTIONS /conversion HTTP/1.1
Response:
HTTP/1.1 200 OK
...
Allow: CONVERT
...