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

Commit

Permalink
Allows encoding while consutring HTTP request for sending notification
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirsoni committed Apr 21, 2019
1 parent 64d7265 commit 17c335f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.util.Map;


Expand Down Expand Up @@ -109,7 +110,7 @@ private CloseableHttpResponse getHttpResponse(BaseMessage message) throws Except
}

httpPostRequest.setURI(uri);
StringEntity entity = new StringEntity(extractBody(message));
StringEntity entity = new StringEntity(extractBody(message), StandardCharsets.UTF_8);
httpPostRequest.setEntity(entity);

return HTTP_CLIENT.execute(httpPostRequest);
Expand Down

1 comment on commit 17c335f

@vamshin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Please confirm the special characters on one of the destinations(CHIME, SLACK, custom webhook)

Please sign in to comment.