Skip to content

Commit

Permalink
Merge pull request #10 from ankit11088/patch-2
Browse files Browse the repository at this point in the history
Update notify_teams.py - added content-type header to teams webhook r…
  • Loading branch information
SatyaVadapalli authored Apr 2, 2024
2 parents 2a6cc33 + bbd4c81 commit 8a78e26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/notify_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def lambda_handler(event, context):
"text": data["text"]
}

req = Request(HOOK_URL, json.dumps(message).encode('utf-8'))
# Explicitly set Content-Type to 'application/json'
req = Request(HOOK_URL, json.dumps(message).encode('utf-8'), headers={'Content-Type': 'application/json'})
try:
response = urlopen(req)
response.read()
Expand Down

0 comments on commit 8a78e26

Please sign in to comment.