Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update webhook POST to send application/json Content-Type

Michał Sipaf54180ace06b
diff --git a/saleor/plugins/webhook/tasks.py b/saleor/plugins/webhook/tasks.py
index f6b797ef39..2159bafde1 100644
--- a/saleor/plugins/webhook/tasks.py
+++ b/saleor/plugins/webhook/tasks.py
@@ -46,7 +46,7 @@ def trigger_webhooks_for_event(event_type, data):
def send_webhook_request(webhook_id, target_url, secret, event_type, data):
headers = create_webhook_headers(event_type, data, secret)
response = requests.post(
- target_url, data=data, headers=headers, timeout=WEBHOOK_TIMEOUT
+ target_url, json=data, headers=headers, timeout=WEBHOOK_TIMEOUT
)
response.raise_for_status()
logger.debug(