RestServices.accessMethods

Returns an array of available HTTP methods to a resource after a HTTP OPTIONS call. e.g GET, POST

Example:

 var uri = "http://example.com/rest/users";
 //create authentication 
 var auth = HttpAuthentication.createBasicAuthentication("username", "password");
 var opts = new RestOptions();
 //setting the wait time to establish a connection to the target server to 5 seconds
 opts.setConnectionTimeout(5);
 //set the time to wait for no inactivity from the rest call to 10 seconds
 opts.setSocketTimeout(10);
 var results = services.rest.accessMethods(uri, auth, opts);
 if(results)
 {
   var list = fields.options.createCustomList();
   for each(var x in results)
   {
      list.add(x);
   }
 }
 
Further documentation.

returns UNKNOWNjava.lang.String[]

Parameters

java.lang.String  uri,  Authentication authentication,  RestOptions options,