HTTP/1.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) and httpbis (http://www.ietf.org/internet-drafts/draft-ietf-httpbis-p2-semantics-04.txt) allow and even recommend this use of OPTIONS, although the HTTP spec intentionally does not specify any request or response entity values. I use OPTIONS quite a bit for such exchanges in my own code. I think an interesting Restlet 1.2 feature would be some kind of a Resource helper that supplied some information about the Representations accepted and emitted. This could be keyed to a specific variant in the OPTIONS request, like the text/uri-list variant emitted by Directory (which I also get a lot of use out of).
- Rob On Thu, Sep 25, 2008 at 7:02 PM, Kevin Conaway <[EMAIL PROTECTED]>wrote: > What are peoples thoughts on using the OPTIONS method to describe what > types of input a resource can handle? The HTTP spec says: > > "The OPTIONS method represents a request for information about the > communication options available on the request/response chain identified by > the Request-URI" > > Currently, Restlet sends the supported verbs back in the headers. Would it > be appropriate for a developer to take this one step further and send > something like an XML schema back in the response body? This way, clients > of the resource could know how to format an XML message (or *any* message > for that matter) before communicating with the resource. > > Kevin >