Skip to content

Commit 3aeadef

Browse files
committed
[hotfix-35904][http] 解决http发送中文乱码
1 parent fe58714 commit 3aeadef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http/http-sink/src/main/java/com/dtstack/flink/sql/sink/http/DtHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static void post(String httpUrl,
118118
String contentEncoding) throws IOException {
119119
HttpPost httpPost = new HttpPost(httpUrl);
120120
httpPost.setConfig(requestConfig);
121-
StringEntity entity = new StringEntity(message);
121+
StringEntity entity = new StringEntity(message, contentEncoding);
122122
entity.setContentType(contentType);
123123
entity.setContentEncoding(contentEncoding);
124124
httpPost.setEntity(entity);

0 commit comments

Comments
 (0)