From e620d4d1ef6d04e16e474487f85374db9d939db0 Mon Sep 17 00:00:00 2001 From: Joachim Barheine Date: Mon, 5 Dec 2016 11:48:45 +0100 Subject: [PATCH] Slack: support incoming webhooks by properly setting content-type to json Change-Id: I32da23036b9bd8787ec32925d81fb85dc6d72010 --- monasca_notification/plugins/slack_notifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monasca_notification/plugins/slack_notifier.py b/monasca_notification/plugins/slack_notifier.py index 97f10b1..96af33a 100644 --- a/monasca_notification/plugins/slack_notifier.py +++ b/monasca_notification/plugins/slack_notifier.py @@ -96,7 +96,7 @@ class SlackNotifier(abstract_notifier.AbstractNotifier): # Posting on the given URL self._log.debug("Sending to the url {0} , with query_params {1}".format(url, query_params)) result = requests.post(url=url, - data=slack_message, + json=slack_message, verify=verify, params=query_params, proxies=proxyDict,