in edas-demo/config-demo/apollo-migration/src/main/java/com/alibabacloud/edas/tool/model/NacosConfig.java [93:118]
public String toFormData() {
String type = "text";
String dataId = DataId.toLowerCase();
if (dataId.endsWith("properties")) {
type = "properties";
} else if (dataId.endsWith("yaml") ||
dataId.endsWith("yml")) {
type = "yaml";
}
String encoded = String.format(
"NamespaceId=%s&Group=%s&DataId=%s&Content=%s&Type=%s&Desc=%s",
NamespaceId, Group, DataId,
preHandleContent(),
type,
safeEncode(Desc));
if (Tags == null) {
return encoded;
}
String tag = Tags.stream().collect(Collectors.joining(","));
encoded += "&Tags=" + safeEncode(tag);
return encoded;
}