RestServices.getLocalUrlBase

Returns a base URL to invoke a RESTful service on this server using localhost i.e. returns a URL of the type: http://127.0.0.1:<port>/<webapp>/api

Example:

 var endpoint = "/orders/getOrders";
 var url = services.rest.getLocalUrlBase() + endpoint;
 var response = services.rest.get(url);
 

returns java.lang.String