Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 488d63d

Browse files
authored
Allows encoding while constructing HTTP request while sending notification closes #33
1 parent 004177e commit 488d63d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import java.io.IOException;
3939
import java.net.URI;
4040
import java.net.URISyntaxException;
41+
import java.nio.charset.StandardCharsets;
4142
import java.util.Map;
4243

4344

@@ -109,7 +110,7 @@ private CloseableHttpResponse getHttpResponse(BaseMessage message) throws Except
109110
}
110111

111112
httpPostRequest.setURI(uri);
112-
StringEntity entity = new StringEntity(extractBody(message));
113+
StringEntity entity = new StringEntity(extractBody(message), StandardCharsets.UTF_8);
113114
httpPostRequest.setEntity(entity);
114115

115116
return HTTP_CLIENT.execute(httpPostRequest);

0 commit comments

Comments
 (0)