-
Notifications
You must be signed in to change notification settings - Fork 80
Allows encoding while constructing HTTP request for sending notification #35
Allows encoding while constructing HTTP request for sending notification #35
Conversation
...com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
Outdated
Show resolved
Hide resolved
...com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
Outdated
Show resolved
Hide resolved
...com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
Outdated
Show resolved
Hide resolved
...ava/com/amazon/opendistroforelasticsearch/alerting/destination/CustomWebhookMessageTest.java
Outdated
Show resolved
Hide resolved
...ava/com/amazon/opendistroforelasticsearch/alerting/destination/CustomWebhookMessageTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Mihir for the changes. Minor comments
@vamshin I just had to use charset while in entity as we've already set in headers on the POST so it wasn't required. I've removed other changes and added the charset for Body String. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the fix
Can you please explain how to set up character encoding? And which version will fix this issue? |
Generally , you can setup like this
This will be released in next Opendistro version. |
Issue #, if available:
#33
Description of changes:
We were not encoding the message while publishing, using the StringEntity constructor with the mime-type and charset.
application/json
application/json
, user can choose other values.Sample Chime notification :
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.