//get the persist state
boolean persistState = args[1].effectiveBooleanValue();
//setup OPTIONS request
OptionsMethod options = new OptionsMethod( url );
//setup OPTIONS Request Headers
if( !args[2].isEmpty() ) {
setHeaders( options, ( ( NodeValue )args[2].itemAt( 0 ) ).getNode() );
}
try {
//execute the request
response = doRequest(context, options, persistState, null, null);
}
catch( IOException ioe ) {
throw(new XPathException(this, ioe.getMessage(), ioe));
}
finally {
options.releaseConnection();
}
return( response );
}