Skip to content

Commit 3c45e82

Browse files
committed
await form
1 parent 7a1ea20 commit 3c45e82

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

github_webhook/webhook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ async def _postreceive(self):
7373

7474
event_type = _get_header("X-Github-Event")
7575
content_type = _get_header("content-type")
76+
form_data = await request.form
7677
data = (
77-
json.loads(request.form.to_dict(flat=True)["payload"])
78+
json.loads(form_data.to_dict(flat=True)["payload"])
7879
if content_type == "application/x-www-form-urlencoded"
7980
else request.get_json()
8081
)

0 commit comments

Comments
 (0)