The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the request URL. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
Typically the options method is used to determine what methods are
supported by the server, and this is accomodated by the
getAllowedMethods function.
OptionsMethod options = new OptionsMethod("http://jakarta.apache.org");
// execute method and handle any error responses.
...
Enumeration allowedMethods = options.getAllowedMethods();
options.releaseConnection();