|
@ -160,13 +160,19 @@ public class GatewayProcessor implements Processor {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
Map<String, String> methodMap = new HashMap<>();
|
|
|
methodMap.put("0", "get");
|
|
|
methodMap.put("1", "post");
|
|
|
methodMap.put("2", "delete");
|
|
|
methodMap.put("3", "put");
|
|
|
|
|
|
JsonNode jsonNode = objectMapper.readValue(param, JsonNode.class);
|
|
|
String host = appApi.getMicroServiceUri().split(",")[0];
|
|
|
String endPoint = "restlet:http://" + host + appApi.getMethodName() + "restletMethods=" + appApi.getMethod();
|
|
|
String url = appApi.getMicroServiceUri().split(",")[0];
|
|
|
String endPoint = "restlet:" + url + appApi.getMsMethodName() + "restletMethods=" + methodMap.get(appApi.getMethod());
|
|
|
final String[] body = {""};
|
|
|
appApi.getParameters().forEach(p -> {
|
|
|
String value = jsonNode.asText(p.getName());
|
|
|
if (p.getType().equals("2")) { //path param
|
|
|
if (p.getType().equals("0")) { //path param
|
|
|
endPoint.replace("{" + p.getName() + "}", value);
|
|
|
}
|
|
|
|