Merge pull request #25542 from Oro/fix-hipchat-v2-sendmessage

Fix hipchat.send_message when using API v2
This commit is contained in:
Nicole Thomas 2015-07-20 09:09:13 -06:00
commit 2f0d695bc0

View file

@ -134,6 +134,9 @@ def _query(function, api_key=None, api_version=None, method='GET', data=None):
elif api_version == 'v2':
headers['Authorization'] = 'Bearer {0}'.format(api_key)
data = json.dumps(data)
if method == 'POST':
headers['Content-Type'] = 'application/json'
else:
log.error('Unsupported HipChat API version')
return False