|
@@ -15,6 +15,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
@@ -25,7 +26,7 @@ import java.util.Objects;
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
public class AIGCRemoteService {
|
|
|
- private final CloseableHttpClient client = HttpPoolFactory.defaultPool();
|
|
|
+ private final CloseableHttpClient client = HttpPoolFactory.aigcPool();
|
|
|
private static final String aigcGetAllContentUrl = "http://aigc-api.cybertogether.net/aigc/publish/content/gzhWaitingPublishContent";
|
|
|
|
|
|
|
|
@@ -40,7 +41,7 @@ public class AIGCRemoteService {
|
|
|
bodyParam.put("params", bodyParamParams);
|
|
|
try {
|
|
|
HttpPost httpPost = new HttpPost(aigcGetAllContentUrl);
|
|
|
- StringEntity stringEntity = new StringEntity(bodyParam.toJSONString());
|
|
|
+ StringEntity stringEntity = new StringEntity(bodyParam.toJSONString(), StandardCharsets.UTF_8);
|
|
|
httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
|
|
|
httpPost.setEntity(stringEntity);
|
|
|
CloseableHttpResponse response = client.execute(httpPost);
|