createRestUrl static method

String createRestUrl(
  1. String serviceOrEntityName,
  2. String methodNameOrEntityId,
  3. Types type
)

creating REST url : http://localhost:8080/test/v2/services/serviceName/methodName creating REST url : http://localhost:8080/test/v2/entities/entityName/id creating REST url : http://localhost:8080/test/v2/entities/entityName/search creating REST url : http://localhost:8080/test/v2/queries/entityName/queryName

Implementation

static String createRestUrl(
    String serviceOrEntityName, String methodNameOrEntityId, Types type) {
  String? urlSuffix = UrlTypes.path[type];
  return "${GlobalVariables.urlEndPoint}/rest/v2/$urlSuffix/$serviceOrEntityName/$methodNameOrEntityId";
}