Commit 4558922a authored by Scott Moser's avatar Scott Moser

webhook: report with json data

the handler was passing a dictionary to readurl
which was then passing that on to requests.request as 'data'.
the requests library would urlencode that, but we want the
json data posted instead.

LP: #1496960
parent 03b5cac3
# vi: ts=4 expandtab
import abc
import json
import six
from ..registry import DictRegistry
......@@ -77,7 +78,7 @@ class WebHookHandler(ReportingHandler):
readurl = url_helper.readurl
return readurl(
self.endpoint, data=event.as_dict(),
self.endpoint, data=json.dumps(event.as_dict()),
retries=self.retries, ssl_details=self.ssl_details)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment