GatewayRestServices.head

Performs a REST HTTP HEAD call on a resource. Returns a RestResponse representing the response. A HEAD is the same as a GET, apart from it does not have a body. This is only used to determine whether a resource is available.

Example:

 //set any headers
 var headers = {};
 //set params
 var params = {"userId":fields.filter.value};
 
 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 response = services.rest.head("myGateway", "/users", headers, params, opts);
 if(response.isSuccess())
 {
      //display available message
 }
 else
 {
      //display failure message
 }
 
Further documentation.

returns RestResponse

Parameters

java.lang.String  gatewayId,  java.lang.String  endpoint,  java.util.Map  headers,  java.util.Map  parameters,  RestOptions options,