mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25542 from Oro/fix-hipchat-v2-sendmessage
Fix hipchat.send_message when using API v2
This commit is contained in:
commit
2f0d695bc0
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue