Merge pull request #1027 from iCHEF/fix_sns_should_send_json_http_message

Send JSON message to HTTP endpoint of SNS
This commit is contained in:
Jack Danger 2017-07-31 12:45:17 -07:00 committed by GitHub
commit 2b76d07558
2 changed files with 11 additions and 2 deletions

View file

@ -84,7 +84,7 @@ class Subscription(BaseModel):
sqs_backends[region].send_message(queue_name, message)
elif self.protocol in ['http', 'https']:
post_data = self.get_post_data(message, message_id)
requests.post(self.endpoint, data=post_data)
requests.post(self.endpoint, json=post_data)
def get_post_data(self, message, message_id):
return {